- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 12:25 AM
Hello all
I would like to call a SLA definition in business rule.I have created an SLA,based called title I need to trig err this SLA.How can we achieve it?else please help me with some other solution
Below business rule am making to increase the priority.
var scsdCaller = current.caller_id.getRefRecord();
var scsdCallerTitle = scsdCaller.title;
var title=['ADMIN','PRO','VP','SVPO','DIR','SR DIR','EVP','CEO','President','CIO','Chairman'];
for(i=0;i<=title.length;i++)
{
if(scsdCallerTitle.indexOf(title[i])>=0|| criticalLoc.u_critical_loc == 'true')
{
setSCSDpriority();
}
}
function setSCSDpriority() {
current.impact = 1;
current.urgency = 1;
current.priority = 1;
}
SLA definition
Thanks
Saranya
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 01:01 AM
Hi Saranya,
the 2011 SLA Engine can be found in the "TaskSLAController" Script Include. It is pretty heavy and I would not recommend to change it. As far as I see it you just need to move your "if(scsdCallerTitle.indexOf(title[i])>=0|| criticalLoc.u_critical_loc == 'true')" condition with all the titles into the SLA and it should work OOTB. Like that the SLA should simply get triggered when the condition matches and you configure rather than customize.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 01:01 AM
Hi Saranya,
the 2011 SLA Engine can be found in the "TaskSLAController" Script Include. It is pretty heavy and I would not recommend to change it. As far as I see it you just need to move your "if(scsdCallerTitle.indexOf(title[i])>=0|| criticalLoc.u_critical_loc == 'true')" condition with all the titles into the SLA and it should work OOTB. Like that the SLA should simply get triggered when the condition matches and you configure rather than customize.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 09:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 11:46 PM
Hi Saranya,
I totally agree. I guess if the titles increase you should see it as a new requirement and to fulfill it something needs to be changes. It is always difficult to maintain string conditions and in this case you at least have the chance to maintain it outside of a script, which should allow a quick change of the condition.