setAbortAction is not working in Scoped application

shaik_irfan
Tera Guru

Hi,

I am currently on a Human Resource Core scope and on the Record producer General inquiry i have an option as Type of issue and if the selects the type of issue as Issue then i need to stop the creation of hr case..

 

In the Record producer i written script like below.

 

new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);

if(producer.type_of_issue == 'issue')
{
current.setAbortAction(true);

}

find_real_file.png

 

@Ankur Bawiskar  can you please help me on this

30 REPLIES 30

Hi @shaik.irfan ,

Write target scope as HR table and then try.

find_real_file.png

 

Regards,

Gunjan


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

@Gunjan Kiratkar 

 

What should be source ?

 

Keep it as global. Do it from global scope.

 

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

It is allowing me to submit

 

find_real_file.png

In which application your record producers are created?


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy