business rule condition

Deepika54
Tera Contributor

Hello experts,

 

The incident state is 'on hold' and on hold reason is 'awaiting caller'. if the state value changes to any other thing apart from 'on hold' and on hold reason as 'awaiting caller', i need to trigger a BR like if it moves to 'on hold' and 'awaiting third party' or lets say it moved to in progress i.e any other value apart from on hold and awaiting caller, the BR Should trigger.

 

Can anyone please help me in the condition part. Thanks in advance 

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepika54 

try this in script of before update business rule

// Only run on update
if (
    previous.state == 3 && // 3 = On Hold (verify your instance's value)
    previous.hold_reason == 'awaiting_caller' && // 'awaiting_caller' is the value in the dictionary
    (
        current.state != 3 || // State changed from On Hold to something else
        current.hold_reason != 'awaiting_caller' // Or On Hold Reason changed from Awaiting Caller to something else
    )
) {
    // Your business rule logic here
	
}

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

View solution in original post

@Deepika54 

Thank you for marking my response as helpful.

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

View solution in original post

5 REPLIES 5

@Deepika54 

Thank you for marking my response as helpful.

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