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

@Voona Rohila : Even for a static value the description field still looks blank.
I had used the same code previously in a different environment and it worked but is not working here now hence i posted my query! 
Only the description seems to be having a problem.. Do you know what could be the cause potentially?

Thanks!

Check if there are any BR's or any client scripts that is clearing the value.


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

Mahathi
Mega Sage
Mega Sage

@sourav1999 : i am trying to map multiple variables on the form to the description field so if i select map to field option and select description, it is only working for one field and doesn't work for the rest

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

Mahathi
Mega Sage
Mega Sage

I have around 10 variables in the record producer and i want to populate all of them in the incident description, is there a shortcut to populate them on description or should we go with Concat format to do it?