Hi all,
I have a scenario where I need an on change event to fire from a programmatic action.
I have an expenses form which follows an approvals process through teams via a flow.
When the user approves the expenses the decision is then updated by the flow in the decision field for the relevant table, but unfortunately the onchnage event is not firing from this, only when the field in the form is manually changed.
From reading online I understand I need to use the fireOnChange method, but I am unsure of how and where I am to use this.
Any guidance would be greatly appreciated.
My onChange event is as follows:
function Expenses (executionContext) {
var formContext = executionContext.getFormContext();
var decision= formContext.getAttribute("decision").getValue()[0].name; //note this is a look up field
if(decision== "Accepted") {
<Expenses Code>
}
}