Business rule Abort action not working

VISWANATH KAMAL
Tera Contributor

I have given abort action for a table in a Business rule based on the conditions it is not creating a entry in the table as expected when we try to submit from portal but in native UI it is creating the entry in the table. How to stop creating the entry in table even we try to submit from native UI.

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Please share the configuration/code that you using.

No code is mentioned just condition and in actions,Abort action is true.

I guess this example can help u :

 

(function executeRule(current, previous /*, ...other inputs */) {

  // Check if the current record meets certain conditions
  if (current.getValue('category') === 'Hardware' && current.getValue('priority') === 1) {
  
    // Log a message indicating the conditions are met
    gs.log('Conditions for aborting the business rule are met.');
  
    // Abort the business rule
    current.setAbortAction(true);
    
    // You can also include additional actions here if needed
    // ...
    
  }

})(current, previous /*, ...other inputs */);

 

I hope it helps !

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Even this is working in portal and not in native UI