简体   繁体   中英

Business process flow dynamic update via javascript broken after rollup 1

I'm doing an update of the business process flow via javascript, based on an option set value.

I'm setting the processId and the stageId, then i force a form save, and on the callback i was refreshing the form. After rollup 1 has been applied the scripts on the page are breaking on page refresh. Does anyone have experience the same problem is something that came out with turboforms for some reason?

This is the code that i'm using at the moment, it works, but onLoad the script i previously set are all failing. They work on the normal load of the page.

NOTE: I'm aware of turbo forms and the asynchronous load of Javascript. But in this case i have a single file, and on refresh it should be cached.

Xrm.Page.data.save().then
            (
                function () {
                    window.location.reload(true);
                },
                function () {

                }    
            );

Xrm.Page.data.process has been introduced to manipulate BPFs.

  • Use getActiveProcess to retrieve information about the active process and setActiveProcess to set a different process as the active process.

  • Use getActiveStage to retrieve information about the active stage and setActiveStage to set a completed stage as the active stage. With Microsoft Dynamics CRM Online 2015 Update 1 you can use setActiveStage to a stage in a different entity

  • Use moveNext to move to the next stage and movePrevious to move to the previous stage. With Microsoft Dynamics CRM Online 2015 Update 1 you can use movePrevious to a previous stage in a different entity

The functions should handle the visualizazion of the process flow. You might need to invoke Xrm.Page.data.refresh if you also need to change/save/reload the form contents.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM