Hi,
I have created a flow in Power Automate which will set the value of a field based on changed value of a Lookup field. Now the problem is since flows are asynchronous, I can see the change in my field value only after I save and refresh the page. So if I change my Lookup value, I dont see a corresponding change in my other field unless I refresh the page. But I want the change in the other field to show as soon as my Lookup value changes. So I tried using the data.refresh JS code that is supposed to refresh without loading the page, on OnLoad & OnChange event of my Lookup field, but somehow my function is not working. Here is my code...
function onLookUpChange(executionContext) {
var formContext = executionContext.getFormContext();
formContext.data.refresh(save).then(successCallback, errorCallback);
}
Can someone please tell me what is wrong with my code? Or if you know any other way of loading the field value as soon as the Look Up value changes, please let me know.
Thanks!