- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I currently have a form on our SP that captures the new incidents. Users are to identify the "Impact" and "Urgency" of thier incident which then is added to the Incident form and will set the priorty.
At this time only the "Urgency" is getting populated after a users submits the form. Is there something wrong with my coding or is there a better way
This is the code I currently have:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
There are easier ways to copy the variables from producer to the target record without any script.
1. If you keep the variable names same as Incident field name, it will automatically copy from record producer
e.g keep the Impact variable name as 'impact'
2. Use "Map to field" on the record producer form
Please mark the answer helpful or correct if it helps
Thanks
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Roshni1 ,
Both Impact and Urgency are often controlled by Data Lookup Definitions or other priority setting logic, which typically executes after your record producer script runs. Meaning writing directly to these fields (even using current.setValue('impact', ...)) can be ignored or overridden by Servicenow system logic.
Check this community post once: https://www.servicenow.com/community/developer-forum/setting-impact-or-urgency-via-script-on-a-recor...
If you find this helpful, please accept this as a solution and hit the helpful button..
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
impact and urgency determine the Priority of INC.
This is controlled by data lookup definitions.
It runs during record insert.
what's not working for you?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
There are easier ways to copy the variables from producer to the target record without any script.
1. If you keep the variable names same as Incident field name, it will automatically copy from record producer
e.g keep the Impact variable name as 'impact'
2. Use "Map to field" on the record producer form
Please mark the answer helpful or correct if it helps
Thanks
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
It finally worked this time. Thank you