- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 10:14 AM
I'm trying to pin down what exactly is causing my "sys_user.source" value to change when this flow runs. It changes it by blanking it out. Once our LDAP import runs, the value comes back to each user record.
I disabled the script include: hr_synchronize
I disabled the BR: Synchronize fields to sys_user
I added the "source" field to the system properties: sync.exclusion_fields.sys_user & sync.exclusion_fields.profile
After all that, running the flow still causes that field to get overwritten.
Anyone have any insights where else I can look?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 07:47 AM
Hi @Kavita Kulkarn1 ,
I just finished another meeting with HI Support and they were able to pin down the issue to a "on after" transform script: https://YOUR_INSTANCE_NAME.service-now.com/nav_to.do?uri=sys_transform_script.do?sys_id=e723a168db07...
Add 'source' to the empty [ ] brackets in the below code.
- Should be on line 11
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
var currentDate = new WorkdayWorkerSyncUtils().getCurrentDate();
if (source.u_primary == '1' && !gs.nil(target.user) && source.u_job_start_date <= currentDate) {
var grUser = new GlideRecord('sys_user');
grUser.addQuery('sys_id', target.user);
grUser.setLimit(1);
grUser.query();
if(grUser.next()){
//added 'source' to the empty square brackets
new sn_hr_core.hr_Utils().syncProfilesWithMap(target, grUser, {}, ['source'], 'true');
}
}
})(source, map, log, target);
If you haven't already, make sure that you also include "source" in the system property : sync.exclusion_fields.sys_user
https://YOUR_INSTANCE_NAME/nav_to.do?uri=sys_properties.do?sys_id=9a4e67a653560010a9e7ddeeff7b12c8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 11:30 AM
@Community Alums
Did you get answer to your question? We are facing the same issue & need WD integration to stop over writing sys_user.source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 11:41 AM
Hi @Kavita Kulkarn1,
I have a current case open with HI Support and I have demonstrated the issue.
In the meantime, since the Flow runs once a day, I scheduled it to run right before another job that will restore the sys_user.source field data so as to reduce any potential length of time where that field is without data. If they find something, I'll update this post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 07:47 AM
Hi @Kavita Kulkarn1 ,
I just finished another meeting with HI Support and they were able to pin down the issue to a "on after" transform script: https://YOUR_INSTANCE_NAME.service-now.com/nav_to.do?uri=sys_transform_script.do?sys_id=e723a168db07...
Add 'source' to the empty [ ] brackets in the below code.
- Should be on line 11
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
var currentDate = new WorkdayWorkerSyncUtils().getCurrentDate();
if (source.u_primary == '1' && !gs.nil(target.user) && source.u_job_start_date <= currentDate) {
var grUser = new GlideRecord('sys_user');
grUser.addQuery('sys_id', target.user);
grUser.setLimit(1);
grUser.query();
if(grUser.next()){
//added 'source' to the empty square brackets
new sn_hr_core.hr_Utils().syncProfilesWithMap(target, grUser, {}, ['source'], 'true');
}
}
})(source, map, log, target);
If you haven't already, make sure that you also include "source" in the system property : sync.exclusion_fields.sys_user
https://YOUR_INSTANCE_NAME/nav_to.do?uri=sys_properties.do?sys_id=9a4e67a653560010a9e7ddeeff7b12c8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 08:44 AM
Hi @Community Alums
It's interesting because I was thinking it's getting synced from Hr Profile to user. However it turned out from HR Jobs to user.
Good to know the root cause and fix. Thanks for sharing the solution!