Riya Verma
Kilo Sage

Hi @Community Alums ,

 

Hope you are doing great.

 

Its not a good practice to use on cell edit client script , for your requirement , you can go ahead with before BR:

  1. the "When to run" section, select "Before" to ensure the rule runs before the record is submitted.
  2. For the "Advanced" condition, use the following script:

 

 

 

(function executeRule(current, previous /*, g*/) {
    if (current.category.changes() || current.subcategory.changes()) {
        if (current.category == 'software' && current.subcategory == 'email') {
            current.setAbortAction(true);
            gs.addErrorMessage("Record submission is not allowed when the category is 'software' and the subcategory is 'email'.");
        }
    }
})(current, previous);
​

 

 

Also when you are using getXML call while calling script include via GlideAjax, its a asynchronous call so it will be going into queue. it will not going to wait to get the response from server and decide the abort action. So this is reason why its failing in script. Try using before BR for your requirement to abort submit.

 

 

 

 

 
 

View solution in original post