Create a Record Producer in ServiceNow that updates an existing user's record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I need to create a Record Producer in ServiceNow that updates an existing user's record instead of creating a new one. The fields that need to be updated are:
Name, Time Zone, Schedule
However, when I create the Record Producer, it currently creates a new record rather than updating the existing user record.
Can someone help me achieve this functionality?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hey @SNOWDeveloper2,
is this for learning purposes or a real requirement?
Because some of that can be done in your Profile on the portal:
- navigate to /sp or /esc (or whatever portal you use)
- click your icon in top-right corner and go for profile:
Comment: this is the right place to change your preferred time zone, in backend (if you have the access to it) you can do it similarly. But non-technical users have access to Portal only.
What exactly do you mean by schedule?
And why would you give chance to change name? If you want to change name after wedding, it shall be done by (user) admin, users shall not have chance to rename name themselves, usually the user data are integrated with some 3rd party tool (LDAP, Workday, Google, ...) so the data are imported into ServiceNow and changes to it are made outside of SN...
Please is this a learning thing or business case? Because it doesn't seem right to me..
If you want to go the record producer way, then create one for sys_user table, create variables and map them:
or by a script field on record producer - example:
current.name = producer.your_variable_name.toString();
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @GlideFather ,
Thanks for the response. Yes, we can now edit profiles from the portal's profile section.
The current requirement is that certain groups — for example, X, Y, and Z — should have permission to edit other users' profiles as well. For users who are only allowed to edit their own profiles, I will make the Name field read-only and auto-populate it with the currently logged-in user's name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @GlideFather ,
Thanks for the response. Yes, we can now edit profiles from the portal's profile section.
The current requirement is that certain groups — for example, X, Y, and Z — should have permission to edit other users' profiles as well. For users who are only allowed to edit their own profiles, I will make the Name field read-only and auto-populate it with the currently logged-in user's name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@SNOWDeveloper2 but as suggested above, updating user data such as Name in SN will be overwritten from the import source... unless it's technical or web service account.
So the schedule is changing the record in agent_work_schedule table or any other?
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */