- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 09:45 AM
Hello,
I'm running into issue getting the Impact and Urgency field value. My code is not working. I think I did something wrong with my code.
JSON Data
23T20:33:41Z","Subcategory":"Other","CustomerImpact":"No","Description":"TEST","BusinessImpact":"TEST","WatchList":[],"WatchList@odata.type":"#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser)","WatchList#Claims":[],"WatchList#Claims@odata.type":"#Collection(String)","Impact":"Low","Urgency":"High","Queued":false,"Modified":"2024-04-
My code
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 08:25 PM
I able to get it to by doing this, thank you all for the help!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 09:57 AM
@Wyatt Fudal1 From where are you getting the JSON data? is it via a web-service/API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 10:07 AM
Web Service. so the code is in inbound record. Everything works in the code except the impact and urgency
Full code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 11:22 AM - edited 04-24-2024 11:23 AM
Hello @Wyatt Fudal1,
Please modify your impact and urgency functions and try once.
function getImpactID(impactValue) {
var impactGR = new GlideRecord('impact');
impactGR.addQuery('value', impactValue);
impactGR.query();
if (impactGR.next()) {
return impactGR.sys_id;
}
}
function getUrgency(urgencyValue) {
var urgencyGR = new GlideRecord('urgency');
urgencyGR.addQuery('value', urgencyValue); // Here is an error before in your script
urgencyGR.query();
if (urgencyGR.next()) {
return urgencyGR.sys_id;
}
}
Please Mark My Answer as Helpful and Accept as Solution, if you find this article helpful or resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 11:37 AM
Sadly that did not work. Would there be another to parse the data from the JSON?