- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2023 05:37 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2023 03:45 AM - edited ‎05-24-2023 03:46 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2023 06:11 AM
@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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2023 06:21 AM - edited ‎05-23-2023 06:22 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2023 05:52 AM
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2023 03:45 AM - edited ‎05-24-2023 03:46 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2023 03:49 AM
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?