October 8, 20178 yr I have a date field which uses the Evaluate Function in the Auto-enter by calculation to update the date when a Signature is entered into a container field. I just found out that the date is being updated with the SYNC date instead of keeping the original date that the signature was entered. For Example: a new signature is entered in the offline file on 10/3/17, the "Date" field gets auto-entered with a date of 10/3/17. On 10/5/17 the offline file is sync'd with the host. Now the date on the host has been entered with 10/5/17 instead of 10/3/17. How do I fix this so the original date gets entered and is not based on when the sync occurs? I need to do this at the field level or Sync layout level, and not through a script trigger because I have the date field (actually 4 date fields) on over 100 layouts.
October 9, 20178 yr I can't think of a very 'clean' way to do this. One hack would be to use the MirrorSync customization script to set a $$sync_is_running global variable, and then unset it when the sync ends. Then you could modify your evaluation to trigger conditionally based on this global variable. I don't feel very confident in this approach though. The only really solid way to accomplish this is by doing it with a script trigger at the UI layer (which I understand why you don't want to do that). If you do decide to use the customization script approach, remember to select the XML option in MirrorSync (not JDBC), because only XML uses the MirrorSync customization script on the server.
October 9, 20178 yr Author Thanks Jesse. Could I change the order the fields are sync'd? If I sync the Signature field first and the Date gets updated with the SYNC Date, and then I sync the Date field, it should overwrite the SYNC date with the Signature Date? right? If this would work, how do I change the order the fields are sync'd?
October 9, 20178 yr No, container fields are always synced last because there is a separate process for updating them in the record.
October 11, 20178 yr Author Thanks. Maybe I can use the "Signed" date on the Signature field and use Evaluate to insert that date into my Date field.
October 11, 20178 yr As far as sync order goes, primary keys are always first, followed by foreign keys, followed by regular fields, followed by any field with an auto-enter option, followed by container fields. Within each group, the order is alphabetical.
Create an account or sign in to comment