Workday Integration Flow overwriting User.Source value

Community Alums
Not applicable

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?

1 ACCEPTED SOLUTION

Community Alums
Not applicable

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

 

View solution in original post

4 REPLIES 4

Kavita Kulkarn1
Tera Contributor

@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.

Community Alums
Not applicable

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.

Community Alums
Not applicable

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

 

Kavita Kulkarn1
Tera Contributor

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!