Create a Record Producer in ServiceNow that updates an existing user's record

SNOWDeveloper2
Mega Contributor

 

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?



9 REPLIES 9

SNOWDeveloper2
Mega Contributor

Hi @GlideFather ,
Thanks for the response. Yes, we can now edit profiles from the portal's profile section.

Schedule field describes the Schedule of the user (Working hours ex "8-5 Excluding Holidays" )

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.

Ankur Bawiskar
Tera Patron
Tera Patron

@SNOWDeveloper2

Why would you update user data via record producer?

User data usually gets created/updated via LDAP.

If this is for your learning purpose then you can use catalog item instead of Record producer and then have variables in your item and after submission of item, have flow configured to trigger on that item and it will update the fields of selected User record

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Requirement: This can be done autonomously by admins

As a x, y, or z

I can edit user profiles for myself and other users

As a Analyst

I can edit my user profile

I cannot edit other user’s profiles
and asked to make a RP

@SNOWDeveloper2 

I still believe it's not a valid business requirement.

Please discuss with your customer on this.
If not then I already shared the approach using catalog item instead of RP

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

M Iftikhar
Mega Sage

Hi @SNOWDeveloper2 ,

Record Producers are primarily designed for creating records in a target table, not for updating ones. In your case, you’re trying to update fields on the sys_user table (Name, Time Zone, Schedule), so the better approach would be to:

  1. Use a Catalog Item instead of a Record Producer.

  2. Add variables for the fields you want to update (e.g., u_name, u_time_zone, u_schedule).

  3. On form submission, use a  server-side logic (script / flow) to update the existing sys_user record.

Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.