Error in Business Rule Execution for List View Modification

Sirisha Thota
Tera Contributor

Hi Community,

We are encountering an issue with a business rule when modifying fields in the list view. Below is the business rule we have written:

 

function executeRule(current, previous) {
    var grStoryState = new GlideRecord('rm_story');
    grStoryState.addQuery('sys_id', current.story);
    grStoryState.query();

 

    if (grStoryState.next()) {

 // If not in pending discussion state

        if (current.state != 6) {
            grStoryState.u_pending_discussion_with = '';
            grStoryState.u_meeting_scheduledd = '';
        }
        // If not in hold state
        if (current.state != 22) {
            grStoryState.u_state_reason_explanation = '';
        }
        grStoryState.update();
    }

})(current, previous);

 

 

When we try to modify the field in the list view, we get the following error:

"Condition 'Condition: current.product.changes() || current.project.changes()' in business rule 'Set Product Backlog Type' on rm_story: STRY001234 evaluated to null; skipping business rule."

 

Could you please help on this?

13 REPLIES 13

Please raise a high ticket with ServiceNow for the same, after checking with your team.

And please mark as helpful and mark as Accepted solution.

Please raise a High ticket with ServiceNow if you are not willing to update OOTB BR.

Please mark as helpful and accepted solution. Thanks

Ankur Bawiskar
Tera Patron
Tera Patron

@Sirisha Thota 

seems your update is causing record update and that is causing the OOTB business rule "Set Product Backlog Type" to trigger and it's failing.

did you debug business rule in details and see?

Update the record using form and see which business rules triggered

Debugging Business Rules 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Nishant8
Giga Sage

Hello @Sirisha Thota, There are a few grey areas, at least to me, in your shared script. However, what I understand is that you are trying to update custom fields in rm_story table, and while doing so, you are seeing the message (if reality is different than assumption, then please correct).

can you please try to include following line in your code after update() statement and verify

grStoryState.update(); //your existing code
grStoryState.setWorkFlow(false); //new line to be added

 

Regards,

Nishant