Change created by to system

Arjun4
Tera Contributor

Hi Everyone,

we have 2 catalog items, If HR submits the first one, it will create a new user in sys_user table, the second form is to update few attributes, When the user gets created in servicenow it is showing the persons name in created by. I want to change it as System.

Please help.

Thank you,

Pranav.

3 REPLIES 3

Uncle Rob
Kilo Patron

By what mechanism is it creating the user?

Yousaf
Giga Sage

Hi Arjun,

Can you please check in dictionary on created by. If thats being handled in default value.


***Mark Correct or Helpful if it helps.***

Alexandre Magea
Kilo Expert

Hello,

What you can do is to have the Record Producer perform the request through a Scheduled job that will execute 1 second later. That way, the creation is all being managed by the system and will be marked as created by the system.

Here's how to do it:

1. Create a Script include in the global scope. It contains two functions (Function 1 is meant to perform the actual user creation, and Function 2 is meant to queue Function 1 call in the scheduler).

2. Here's what it look like to queue the function call in the first function:

find_real_file.png

 

3. In your Record Producer, call the function requestAsyncCreation and pass any parameters that will be necessary to complete the account creation.

 

I hope it helps!

Alex