Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain Separation: the domain chosen in the browser is ignored (due to session based setting) #3

Open
dynamicdan opened this issue Mar 25, 2015 · 1 comment

Comments

@dynamicdan
Copy link
Owner

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:

  1. 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.
  2. 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:

sys_domain: '86799cc40f943100308a0eece1050e77',
sys_domain_path: '!!!/!!$/',

OR

sys_domain: 'global',
sys_domain_path: '/',

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:

{
  syncHash: "231234827398472937492sadsasdas12",
  sys_domain: '86799cc40f943100308a0eece1050e77',
  sys_domain_path: '!!!/!!$/',
  sys_updated_on: '2015-03-25 11:26:57',
  sys_updated_by: 'joe.blogs',
  sys_scope: 'global',
  sys_id: 'd31951010f8b7100f5a07f5ce1050ec9',
}
@dynamicdan dynamicdan changed the title Records using Domain Separation use the users domain not the chosen domain Domain Separation: the domain chosen in the browser is ignored (due to session based setting) Mar 25, 2015
@dynamicdan dynamicdan self-assigned this Apr 1, 2015
@dynamicdan
Copy link
Owner Author

Saving more meta data now possible. Need to add logic for handling diff domains (if even possible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant