web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to auto refresh the form when click on button or on save event

(0) ShareShare
ReportReport
Posted on by

Hello,

I have a custom button that contains workflow .

After clicking on button, workflow executes properly but form not refresh automatically.

I have tried  Xrm.Page.data.refresh(); in javascript but it not worked.

please help me in this case. 

Thank you in advance.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Nilam,

    You need to perform the refresh action after processing successful response for the workflow execution. Below sample code indicates where to write your refresh action. Normally, i am using javascript to execute the action of the WF then perform save or refresh.

    SetStateResponse: function (req, successCallback, errorCallback) {

                   var strResponse = req.responseXML.xml;

                  //alert(strResponse.toString());

      //alert(req.readyState);

      //alert(req.status);

                  if (req.readyState == 4) {

                  if (req.status == 200) {

                  if (successCallback != null)

                  {

    // perform refresh here

    successCallback();

     

    }

                  }

                  else {

                      errorCallback(SDK.GIB._getError(req.responseXML));

                  }

              }

    //SDK.GIB._getError(req.responseXML);

          }

  • Community Member Profile Picture
    on at

    Hi! 

    Check this link:

    Hope this helps

     

    Vlad

    dynamicalabs.com

    Disclaimer: Any post on this page provided "as is" without warranty of any kind and is for educational and information purposes only. We disclaim any liability arising from any reliance placed on any post

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans