Need full
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 11:34 AM
In record producer Variable I have one variable drop down variable name is "This the issue "
a resolved
b in progress
Suppose user select a
I want to set state of incident resolved And update the resolution code
Suppose user select b
I want to set state of incident is in progress In service now
i tried below script in record produce script field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 11:53 AM - edited ‎09-27-2024 12:01 PM
Write this in record producer script field
var issueState = producer.variables.this_issue_request_is;
var incidentGR = new GlideRecord('incident');
incidentGR.get(producer.varibales.inc);
if (incidentGR.isValidRecord()) {
if (issueState == 'Resolved') {
incidentGR.state = 6;
incidentGR.close_code = 'code';
} else if (issueState == 'In Progress') {
incidentGR.state = 2;
}
incidentGR.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 09:30 AM
Not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 12:05 PM
Share your updated script and what is not working..have u added logs ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 07:37 AM