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 refresh page with plugin?

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I wrote calculating duration when get AddUserToRecordTeam message with plugin. The page needs to be refreshed in order to be processed. For this reason, I need a code fragment that refreshes the page at the end of my operations. How can I do it ?

Thanks for helps,
Bora Acici

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    Hello,

    Plug-in code runs in the background and can not interact with the User Interface.

    You'd need to use JavaScript to refresh the page but, JavaScript can't reliability trigger on the AddUserToRecordTeam event.

      

    Perhaps a custom ribbon buttons would be helpful here, where you use JavaScript to both add the user to the team, then wait for an X period and then refresh the page.

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    6,211 on at

    Hi Bora,

    You cann't refresh a page from Plugin instead you can use javascript using below code

    Xrm.Page.data.refresh();

    Also you can refer: community.dynamics.com/.../the-xrm-page-data-refresh-method

    If you find it helpful, Please mark my Answer as Verified.

    Best Regards,

    Shahbaaz

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Bora ,

    From server side you can not refresh client side page . So you need to write some client side logic when your event trigger from client side .

    Here is some reference you can check -

    msdn.microsoft.com/.../dn481607.aspx

    community.dynamics.com/.../the-xrm-page-data-refresh-method

    Hope this helps.

  • Pranesh M Juwale Profile Picture
    1,196 on at

    Hi

    Refreshing page from plugin is not feasible.As suggested by other folks, you need to find workaround using clientside scripting for this scenario.

  • Suggested answer
    jlattimer Profile Picture
    24,562 on at
    You could create a custom Action and register a plug-in on it. Call the Action with JavaScript and when it completes use JavaScript to refresh to page.
  • Community Member Profile Picture
    on at

    Greetings,

    Could you show an example if you have?

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