- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 11:48 PM
Good day!
I have created an incident form with some custom variables, and have mapped one of the custom vars to update the impact variable with an onChange CCSript.
Then there is a new response SLA that is triggered for this incident form.
So far so good.
Now what I need to achieve is have the SLA definition change base on that custom variable.
eg.
Custom variable is response and has 3 options 14, 19, 45.
CCSript sets impact to 1 for option 14, 2 for 19 and 3 for 45.
By default the response is set to 45 and is read only for non fulfillers.
The first time the script runs that is with the submission of the inc and the SLA 45 is triggered and attached on the said inc.
Afterwards, I change the response var to 19, fill in a worknote (it is mandatory) and hit save. The impact var doesn't change and the SLA 45 def does not get cancelled. Obviously as a result the SLA 19 does not get attached on the inc.
Attached the CCSript.
Any thoughts?
Thank you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:14 AM
Hello, I managed to change the SLA depending on a question that was on the form of the incident.
So case closed!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:07 PM
Good day @Mark Manders,
Thank you for the post. After some fiddling about I managed to switch the SLA from SLA 45 to SLA 14 or 19, by changing the impact value from the INC form.
What I can't do though is change the impact value by changing the custom variable SLA response .
Shouldn't the onChange script run every time I change the custom variable and in sequence change the impact value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 02:44 AM
What does the console log say?
And I am wondering now you mention 'variable'. Is this on the portal or in the backend? And if it's in the backend, is it a variable from the variable editor you are changing, or is this a field on the form itself?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 02:50 AM
I didn't change the script to have the console commands. -I think the issue is that the script doesn't run on the catalog item after the submission.
I'm talking about the backend and the custom variable is on the form as part of the Variable Set attached to that catalog item.
So, if I add the console commands you suggested, where can I see what it will return?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:14 AM
Hello, I managed to change the SLA depending on a question that was on the form of the incident.
So case closed!