locked
Issue related to BPF Stage Navigation 2016 OL RRS feed

  • Question

  • Hi All,

    I am trying to move stages dynamically in BPF using JS.
    The OOB setStage and movenext is creating issue as the response is always the dirty\invalid.

    //So i am using the script
    Xrm.Page.getAttribute("stageid").setValue(stageGUID);

    //after next i am calling the save method.

    Xrm.Page.entity.save();

    I can see the stage is moving but not in active, it is active only after the page is refresh.

    I have added refresh as below


    Xrm.Page.data.save().then
            (function () {
                   // Refresh
                },
                function () {
                  // Alert
                }   
            );

    If i use the above the page, then every time stage moved by the above js the confirmation popup is showing to move away from the page or stay back in the same page.


    /////////////////     Final Code    /////////////////

    Xrm.Page.getAttribute("stageid").setValue(stageGUID);
    Xrm.Page.data.save().then
            (function () {
                   // Refresh
                },
                function () {
                  // Alert
                }   
            );


    Please let me know the wrong side of my code and assist me in correction.

    Thanks
    Vijji


    Thanks & Regards Vijji



    • Edited by Vijji MSL Friday, March 18, 2016 7:58 AM
    Thursday, March 17, 2016 6:16 AM

All replies

  • Hello,

    I haven't worked with that functionality much so I can suggest a workaround - try to use following code:

    Xrm.Page.getAttribute("stageid").setValue(stageGUID);
    Xrm.Page.data.save().then
            (function () {
                   Xrm.Utility.openEntityForm(Xrm.Page.data.entity.getEntityName(), Xrm.Page.data.entity.getId());
                },
                function () {
                  // Alert
                }    
            );


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Friday, March 18, 2016 12:28 PM
    Moderator