Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Starting RITM SLA based on first catalog task creation

Mathieu Van de
Tera Contributor

Hi All,

 

I need my RITM SLA to start when first catalog task will be created because this task will only be created 3 days before a specific date from a variable (this date is entered by the requestor in the Service Portal)

 

On my sla if i set the following start condition, is it going to work ? : 

 

If item is "the catalog item concerned"

AND

Requested_item.Parent_task.active IS true (so I mean if there is an active task for this catalog item, then the SLA should start)

 

Thanks in advance

 

KR,

5 REPLIES 5

Its_Azar
Kilo Sage

Hi there @Mathieu Van de  

I dont think this is not a right way to start an SLA on the RITM

Start SLA when first catalog task exists

Use a start condition that checks for at least one task.

Example SLA start condition (script):

var taskGR = new GlideRecord('sc_task');
taskGR.addQuery('request_item', current.sys_id);
taskGR.setLimit(1);
taskGR.query();
answer = taskGR.hasNext();

 

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.

Hi Azar,

 

How can I use a script in a SLA start condition please ?

 

Thanks

brianlan25
Kilo Patron

You say you want a RITM SLA but it sound like you are using the sc_task table as request_item is not a field on the sc_req_item table. I'm not sure this would be possible unless you create a field on the sc_req_item table that gets set to true when the first task is generated. Then you could put a conditions of something like First Task is true.

Hi Brian,

 

In my SLA definition I do use the sc_req_item table.

 

The solution you proposed seems interesting, thanks for this.

 

Should also work if I create a new field on sc_request table ?(better im my case because no one will see this new field as we dont use and/or look at request form during operations)

 

I think I could access this new field in the start condition using dot walking.

 

Thanks