current.setAbortAction(true); in After Business Rule

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 02:05 AM
I have written an After Business Rule in a scoped application.
I am evaluating certain conditions in it after which i am deciding if the record should get inserted or not.
Even when i use current.setAbortAction(true); the record still gets inserted in the table because it is 'after-insert or update' business rule.
I have some peculiar requirements because of which i cannot use before BR.
Any help would be appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 02:08 AM
It doesn't make sense to abort an action in a after business rule and it won't work either.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 02:11 AM
Hello,
After BR is used for update related record based on current update.
Let me know what you are validating after saving the current record.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 02:14 AM
Agree with the people before me. An after BR cannot be used to abort a transaction as the transaction has already happened.
Probably you will need to split your BR in a before (validating and aborting if needed) and an after to do whatever else you had to do.
Bear in mind though, the after BR should not need to update the current record as this could lead to a circular update calling itself again. Be careful with this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2016 02:38 AM
Could you please refer to this question of mine.
My current question has arised from above article.