Hello ALL Experts,
I need to know is it default behavior of CRM 365 that ,
I have Business Process Flow on custom entity having different stages ,
when i click on Next Stage button , the bottom right corner button seems to be automatically saving.
My query :-
when we click on Next Stage the save button automatically saves it, what actually it's doing , is it saving the whole form again, or something else happening there.
if it's saving the whole form again then one custom JavaScript code has been written on form save which does the updation of the field on the with stage name.
*This post is locked for comments
Hi,
If it is to tedious to achieve it with Javascript, you could also implement a plugin running on the update of the "stage name" field.
Hi,
you need register the function under onload.
Hello Experts,
for which event handler do i need to register the function.
can anyone help me in that.
Hi,
or if you do not want to go for Javascript, you can create a workflow to do that ( make sure you apply enough checking before update the record, such as stage id or stage name). you can refer to the below article to see how to implement a workflow inside a BPF
alexmscrm.blogspot.my/.../dynamics-365-workflow-within-business.html
yes as jie suggested, you register your JS on stage change. Pls use the below code
formContext.data.process.addOnStageChange(myFunction);
Reference:docs.microsoft.com/.../addonstagechange
Hi,
you need change your javascript to trigger when stage change , more information please refer to below post.
Hello Experts,
After change of the Next Stage i want the form to be saved.
there is one JavaScript which is written on form load and save for both.
that JavaScript code tries to set the value to a field on the form which is in hidden section to the stage name.
Now when click on Next Stage the bottom right corner save button changes to saving that means the form is getting saved.
if it's getting saved then the value in the text field also be saved, but unfortunately it doesn't.
when we refresh form it shows unsaved changes.
so i want explicitly the form should be saved with the change in the value.
any help will be appreciable.
yes it the behavior . Even though if you turn off the auto save for all form from System Settings, upon click on "Next Stage" if the form is dirty it will save the form upon moving to next stage.
just try the below js on the form.
https://community.dynamics.com/crm/b/1984crm/archive/2016/12/07/disable-auto-save-on-only-one-form
Hope this helps. Pls mark it as Answered/Verified to close the thread if suggestion resolved your query
Hello Aric,
i want to explicitly save the form fields when i click on Next Stage ,
is it possible to do that.
Hi,
The Save operation that happens in the background (AutoSave), only saved the fields that were changed since the last save, not everything. If you did not make changes but moved stages, it is likely that some system fields (such as stage for example) got dirty, which is what is causing the form to save.
Hope this helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156