Auto-populating the Contact and Account fields on case from record producer

cstangoe
Mega Guru

Hi All.

 

We are currently implementing CSM I am looking to get the Contact and Account fields on the case form to be automatically populated with the person who has submitted the case from the record producer. Any idea what the script code would be for these two fields?

 

5 REPLIES 5

Akshaymhaske
Tera Contributor

Hi, 

 

You can achieve this using catalog client script. But for that in users profile (sys_user table) contact & accounts fields should be available.

Use g_user.userID() to get the logged in users sys_id.

 

Or you can create two variables, one for account and one for contact and in the default value field use

javascript:gs.getUser().getCompanyID() for the account

javascript:gs.getUserID() for the contact

 

Hi @cstangoe ,  @Roman27  and @Akshaymhaske , I have the same requirement with the questions but tried both of your script, they didn't work, any other idea on how to set up?

Hi samala830

 

Just had a look at the record producer script section and we have the following which pulls through the contact and account values on the case table

 

current.contact=gs.getUserID();

current.account=gs.getUser().getCompanyID()