- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 01:01 AM
Hi All ,
We have build some custom field in Hr profile and User profile. We have requirment when in case HR pofile get some field update same field need to sync with User table .I have checked there is OOB BR (Synchronize fields to sys_user) and SI (hr_Synchronize and hr_Utils ) is there but there nothing to mapping. so cusome filed update in HR profile same field can update in User table.
Can any one suggested how to do to sync with HR profile and user table ?
Solved! Go to Solution.
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 02:16 AM
Hi,
The BR invokes script include hr_Synchronize and function syncRecord
In that syncRecord function update the new field with your destination field and run once
The part in bold is newly added; Ensure you give correct field names from both the tables
var profileMap = {
'address': { 'destField': 'street' },
'country': { 'destField': 'country', 'func': this._mapProfileField },
'position': { 'destField': 'title', 'func': this._mapProfileField },
'source': { 'destField': 'hr_integration_source' },
'u_custom_profile_field': { 'destField': 'u_user_field' }
};
Similarly if you want sync to happen from User -> HR Profile
then update the else section like this
var userMap = {
'country': { 'destField': 'country', 'func': this._mapUserField },
'hr_integration_source': { 'destField': 'source' },
'street': { 'destField': 'address' },
'title': { 'destField': 'position', 'func': this._mapUserField },
'u_user_field': { 'destField': 'u_custom_profile_field' }
};
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 04:18 AM
I have created new BR and script include to manage the custome field sysc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 04:20 AM
Good to know but it seems you marked other answer correct instead. As that was the very first comment to update field i.e. to create new BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 12:13 AM
Hi @accsukant,
We have the same issue. I hope you don't mind to share to us the BR and script include that works for future reference.
I would appreciate your response. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 04:39 AM
Hi,
I believe that should still be fine.
During the upgrades the component will be skipped but can be reviewed and necessary steps can be taken during skip log analysis.
What are the best practices for customization?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader