I have multiple BPF's for a entity. I have events registered onStageChange & onStageSelected of the BPF. These function are written on the onload block of the JS.
I can switch the BPF using the Switch Process ribbon button. When I switch the process then the onload block executes and sets the field value of a custom field but it is not saved . It gets reflected as unsaved changes. There is a custom function which sets the value of that custom field but it doesn't save the value. The value is only saved only after explicitly saving the form.
If I would explicitly save the form in the custom function it would again call the function which is registered on onSave event.
Any suggestions /approaches to overcome the issue of unsaved changes on BPF switch.
Thanks in advance!