how to auto populate logged in user in Requestor field if we take reference as Contact table in CSM

Srinivasu2
Tera Contributor

Hi Community,

 

how to auto populate logged in user in Requestor field if we take reference as Contact table in Record producer in CSM

 

Please find the screenshots

Srinivasu2_0-1710256100305.pngSrinivasu2_1-1710256184408.png

 

Please suggest how to auto populate logged in user in Requestor field if take reference as contact table instead of sys_user table 

 

Thanks,

Srinivasu

4 REPLIES 4

AshishKM
Kilo Patron
Kilo Patron

Hi @Srinivasu2 ,

 

Set the default value for Requestor.

 

javascript:gs.getUserID();

 

AshishKMishra_0-1710257816727.png

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

I used custmer_contact table as reference instead of sys_user, you can find out this in above screenshot

 

Could you please suggest?

 

Thanks,

Srinivasu Sagiraju

the logged in user will be there in user table. 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Servicenow34
Tera Guru

Hey @Srinivasu2 

Kindly follow below steps.

1. Set the default value as below

javascript:gs.getUserID();

 

2. As the Requested for is read only field please add the reference table as user instead of contact. (optional as there are chances that logged in user record may not be present in contact list)

 

Kindly mark helpful or accepted.

Thank you!