How to set true condition in macros

  • KM01591929
  • 29-May-2015
  • 29-May-2015

Summary

How to set true condition in macros

Question

How to set true condition in macros

Answer

Normally, macros are configured using the expressions $L.new and $L.old to validate if there is a change in the record.
When using "true" conditions, the action in the macro will be executed all the time. Take for example a scenario where a macro sends an email when an Interaction is Saved, Service Manager will send an email even if the record has not been changed, so if there are multiple updates on the record, same number of emails would be sent.
That is the reason why normally, the condition contains a comparison between $L.old and $L.new:
not same($L.old,$L.new)
So, the system will only perform the task selected in the Macro Type field when the record has been changed.
That said, if there is a need to emulate this behaviour, the following expression can be used: 1=1
Note: Make sure, the type of the condition field in the macros dbdict is logical