In Business rule how to add the condition if worknote contains xyz

JPSS
Tera Contributor

A business rule in incindet table needs to be run when the worknotes contain xyz

 

How can we achive this.

3 REPLIES 3

Bert_c1
Kilo Patron

Screenshot 2023-10-20 112100.png

 

Select the "Work notes" field in your condition.

gajananvw
Tera Expert

Hi

you can try below code to identify the 'xyz' in worknotes 

var getWorknotes = current.work_notes.getJournalEntry(1); // last updated worknotes 

getWorknotes.contains('xyz'); // return true if it contains xyx

 

Alka_Chaudhary
Mega Sage
Mega Sage

Hello @JPSS ,

You can write condition in the advanced section of business rule.

current.work_notes.getJournalEntry(-1).contains('xyz') == true

Please refer to below screenshot:-

Alka_Chaudhary_0-1697819785160.png

Please Mark my answer Helpful & Accepted if I have answered your question.

Thanks,

Alka