Record Producer Variable not getting copied to description

Mahathi
Mega Sage
Mega Sage

My requirement  is to copy all the variables from the record producer into the description field in Incident, i find the standard mapping of the rest of the fields working fine with current.fieldname=producer.variablename; except the description. Please find my code below:

current.contact_type = 'self-service';
current.caller_id = gs.getUserID();
current.short_description = 'Request';
current.location = Producer.location;
current.description = 'What is the purpose of the site :\t' + producer.purpose + '\n\n1. site name: \n\t' + producer.team_name;

 

 

Any leads will be appreciated.

 

Thanks!

1 ACCEPTED SOLUTION

Mahathi
Mega Sage
Mega Sage

Thankyou everyone for the response, the issue was with the Producer.location line and hence the description was not populated.

After changing to producer.location, it is working fine

View solution in original post

9 REPLIES 9

sourav1999
Mega Guru

- Record Producer Variable not getting copied to description can be caused by an incorrect mapping in the record producer
- Check the variable mapping and ensure the "copy to description" option is checked
- If the variable is not mapped correctly, the value will not be copied to the description field
- If the variable is mapped correctly, check the field type of the variable and the description field to ensure they are compatible
- If the field types are compatible, ensure the variable is visible and active in the record producer

 

For asking ServiceNow-related questions try this :

For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.

Link - https://nowgpt.ai/

 

For the ServiceNow Certified System Administrator exams try this :

https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER

Voona Rohila
Mega Patron
Mega Patron

Hi @Mahathi 

Try this

current.description = 'What is the purpose of the site :\t' + producer.purpose.getDisplayValue() + '\n\n1. site name: \n\t' + producer.team_name.getDisplayValue();

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Hi Voona,

 

I still see the description field is blank.

Thanks!

I just tried and it's working as expected.

 

Can you just try giving Static value and see if it's still blank?




Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP