Bug in adding values to record, semi colons replaced with commas
I think I've found a bug? Using 1.1.3
I have a custom workflow that adds a fields from a settings node to one of the contour record fields. This value has a semi-colon separated list of email addresses that I want to use to send to in the next workflow in the list. The field it adds to is called "send to".
When I try and reference the field to send an email to using the send to email task (or the xslt email task), nothing happens. I've looked in the database, and it looks like in the values for the form, the separating semi-colon has been changed into a comma. e.g. [email protected];[email protected] becomes [email protected],[email protected]
OK, it turns out that issue is caused by the nodeFactory in the core. If I request the field from there, it replaces the ; with , for some reason. Have got round that by adding some code to swap it back again in my workflow.
There is another issue though. My first workflow is making some changes to the record (based on the selection from a dropdown it updates some hidden tracking fields). The second task sends an XSLT formated email to one of the fields that I've set in the first workflow.
The second workflow sees the fields I've updated as still being empty (although when I look at the records in the record viewer I can see that the fields have been updated correctly).
So my guess is that either:
the workflows are not being loaded in the correct order for some reason (or are running concurrently rather than one after the other)
the second workflow is not picking up on the fact that I've changed the record and is using the orginal record rather than the updated one
//save and update the record FormStorage fs = new FormStorage(); Form f = fs.GetForm(record.Form); RecordStorage rs = new RecordStorage(); rs.UpdateRecord(record, f); rs.UpdateRecordXml(record, f); fs.Dispose(); rs.Dispose();
Any ideas what's going on?
Failing that, as a quick fix, if it would be possible to provide the source of the send XSLT Formatted Email workflow (as the shared source is out of date and doesn't include it), I could just roll a custom version of that into my first workflow and avoid the issue entirely.
Bug in adding values to record, semi colons replaced with commas
I think I've found a bug? Using 1.1.3
I have a custom workflow that adds a fields from a settings node to one of the contour record fields. This value has a semi-colon separated list of email addresses that I want to use to send to in the next workflow in the list. The field it adds to is called "send to".
When I try and reference the field to send an email to using the send to email task (or the xslt email task), nothing happens. I've looked in the database, and it looks like in the values for the form, the separating semi-colon has been changed into a comma. e.g. [email protected];[email protected] becomes [email protected],[email protected]
OK, it turns out that issue is caused by the nodeFactory in the core. If I request the field from there, it replaces the ; with , for some reason. Have got round that by adding some code to swap it back again in my workflow.
There is another issue though. My first workflow is making some changes to the record (based on the selection from a dropdown it updates some hidden tracking fields). The second task sends an XSLT formated email to one of the fields that I've set in the first workflow.
The second workflow sees the fields I've updated as still being empty (although when I look at the records in the record viewer I can see that the fields have been updated correctly).
So my guess is that either:
In the first workflow, I call the following:
record.GetRecordField(new Guid("6372493d-7932-46a6-8544-3c838dc66d36")).Values.Add(mappingDetails.GetProperty("sendTo").Value);
//save and update the record
FormStorage fs = new FormStorage();
Form f = fs.GetForm(record.Form);
RecordStorage rs = new RecordStorage();
rs.UpdateRecord(record, f);
rs.UpdateRecordXml(record, f);
fs.Dispose();
rs.Dispose();
Any ideas what's going on?
Failing that, as a quick fix, if it would be possible to provide the source of the send XSLT Formatted Email workflow (as the shared source is out of date and doesn't include it), I could just roll a custom version of that into my first workflow and avoid the issue entirely.
:)
is working on a reply...