If you are using domain separation then the records will only ever be updated based on the users domain.
If you change the domain in the web browser then it is only set per session and not per user. There is no workaround other than using the standard ServiceNow interface to do changes to records that need to be in a different domain than the current user.
2 proposals:
Save the domain information in a meta file when the record is first downloaded. Use this information to always set the domain field for the record correctly.
Let the user specify the domain via a comment like /* DOMAIN MUST BE: global */ in the file. Would help future users to ensure they do not edit the file in the wrong domain.
Perhaps both proposals should be implemented as domain separation can be problematic to debug.
When we download a file we have the full sys_domain details that can be used to update the record correctly. The domain data looks like this:
In any case, these 2 properties could be stored somewhere. In the file is not so ideal because we need to pollute someones code/xhtml block. Saving in a .meta dir would be ok but makes for more files. We should instead extend the existing .sync concept and save out JSON files like this:
If you are using domain separation then the records will only ever be updated based on the users domain.
If you change the domain in the web browser then it is only set per session and not per user. There is no workaround other than using the standard ServiceNow interface to do changes to records that need to be in a different domain than the current user.
2 proposals:
/* DOMAIN MUST BE: global */
in the file. Would help future users to ensure they do not edit the file in the wrong domain.Perhaps both proposals should be implemented as domain separation can be problematic to debug.
When we download a file we have the full sys_domain details that can be used to update the record correctly. The domain data looks like this:
OR
In any case, these 2 properties could be stored somewhere. In the file is not so ideal because we need to pollute someones code/xhtml block. Saving in a
.meta
dir would be ok but makes for more files. We should instead extend the existing .sync concept and save out JSON files like this: