How to send last updated work notes by API ?

DIVI1
Tera Expert

Hi, 
It's little bit complicated, especially for me, cause I want to sent last updated work notes to other system using API, and I have something like that in the Business Rule: 

 

 

	var worknotes = current.work_notes.getJournalEntry(1);
	var onlyNotes = worknotes.split("(Work notes)\n");
	var lastWorknote = onlyNotes [1];

 

 

but the problem is, even if the work notes field doesn't has been updated, the last updated one was sent again...
so here is my question: how to add condition only for that one field, value will be sent when the field has been updated.

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Hello,

In the condition for the business rule you'd set it to execute only if the work notes changes.

AllenAndreas_0-1678292081582.png

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

no chance for that because I have there other specific conditions for groups update etc.

Hello,

Feel free to share the other conditions in your post so that we reply with information you find relevant. Without knowing the details, we can only reply with information we think would help in the context of what you've given us. Such as after I suggested to use a condition of work notes changes...you've since replied to others with an if statement in your script evaluating if the work notes have changed:

current.work_notes.changes()

 That isn't in your original post. Please ensure you give as much information as you can so we can help you...


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!