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

then create BR in global scope for that HR table and abort the transaction

If you are not able to select the table in global scope then ensure allow configuration checkbox is checked at table level

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

since i do not have any other option i can go with BR on HR Table but i would like to understand can i differentiate saying this should abort only when the record is created from a Record producer.

 

Is there a way to categorize this ?

Hi,

you can check if record is present in this table

sc_item_produced_record

But I doubt if record gets created in that before insert

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @shaik.irfan ,

 

go to the table definition and look in the Application Access section to ensure it has something like this: Accessible from all application scopes and other parameters as shown below.

 

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 

 

Here is my current setup on table

 

find_real_file.png