setAbortAction is not working in Scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2021 11:27 PM
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);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2021 11:18 PM
Hi Shaikh,
For every scoped application we need to create a separate record for cross scope access.
In your Case the record producer is in sn_hr_sp application scope, so you need to select that scope in target field. If you create record from any other scope and see this issue then you will need addition cross scope access policy for that scope as target.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2021 11:22 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2021 12:35 AM
Can you please share Application scope of your Business rule?
That will decide the Source Scope and Application Value on cross scope Application record.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2021 01:04 AM
I did not written any Business Rule
setAbortAction is written on Record producer and here is the script
if(producer.type_of_issue == 'issue')
{
producer.setAbortAction(true);
}else
{
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2021 01:20 AM
Hi Irfan,
Have you tried
current.setAbortAction(true); in recrod producer script?
Thanks,
Abdul
Please mark my response as correct and helpful in case of any impact.