Skip to main content
Answer

Business Even Trigger Conditions - Compare New and Old values

  • February 23, 2025
  • 5 replies
  • 126 views

Forum|alt.badge.img

We are creating a business event to trigger an email if a POLine Promised Date changes by more than a certain amount. The logic for the comparison is, if the change in date of the Promised Date is greater than 20% of the difference between the old Promised Date and Today() we want to trigger the email. I cannot figure out how to reference both the old and new value in the Trigger Conditions to achieve the desired result. I can’t be sure, but from my testing, if I chose Operation: New Field Value or Old Field Value, the value of Promised Date field on both sides of the Condition are value as specified in the Operation. How can I get both new and old values together in an expression to compare these to decide if the date change was significant enough to trigger the Email Subscriber?

Best answer by cberwaldt

Hi ​@cberwaldt were you able to find a solution? Thank you!

Great question! Yes we did find a solution but not exactly as simple a solution as we wanted. We had our VAR add in an additional table to the POLines table to record the Previous Promise Date. When the Promise Date is updated, the Previous Promise Date is set to the original value. So then when using Business Events, we can reference both values.

5 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • February 23, 2025

I don’t believe you can use Data Field as both side of equation. What you can do is to add a custom field to the POLine and either using a Graph Extension assign a true/false or days changed and then use this custom field in your BE


Forum|alt.badge.img+12
  • Acumatica Support Team
  • February 24, 2025

Hi ​@cberwaldt 

Following approach may also help. You may have to explore further. 

Regards,


Forum|alt.badge.img
  • Author
  • Freshman II
  • February 24, 2025

@vkumar thank you. I did see that thread yesterday, and actually posted a reply there, because I do not seem have the AUAuditHistory in my DAC. I have AuditHistory but it lacks the segmented detail I would need to join it to the POLines table in a straightforward way.

 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • May 27, 2025

Hi ​@cberwaldt were you able to find a solution? Thank you!


Forum|alt.badge.img
  • Author
  • Freshman II
  • Answer
  • May 28, 2025

Hi ​@cberwaldt were you able to find a solution? Thank you!

Great question! Yes we did find a solution but not exactly as simple a solution as we wanted. We had our VAR add in an additional table to the POLines table to record the Previous Promise Date. When the Promise Date is updated, the Previous Promise Date is set to the original value. So then when using Business Events, we can reference both values.