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

Anil Nemmikanti
Giga Guru

Hi @Sirisha Thota ,

I believe the condition is evaluated as null so it is skipping the BR. Can you confirm the product or project fields are getting changed when updating in the list view.

Hi @Anil Nemmikanti ,

 

No, both fields are not changing on the story

The BR will get executed when the condition is met. Are those product or project fields available on the table because it is returning null

Hi Anil,

 

Only Product field is available, but that is not changing.