Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Refresh Screen from Ribbon and Stay on same Tab

(0) ShareShare
ReportReport
Posted on by 184

Hello,

Is there a way to configure the refresh to keep the users on the current tab after they hit the Refresh button in the Ribbon (not browser)? 

For example, we have a My Work tab and Interaction tab on the lead. If I am on the Interactions tab and I hit refresh, it takes me back to the My Work tab.

pastedimage1684856598918v2.png

  • nvrhughes Profile Picture
    nvrhughes 184 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Bipin Kumar I did, and there are no hide actions or any functionality surrounding this button in the XML.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Hi,

    I have done multiple times in my previous project but it is strange that you are facing this issue.

    Can you try exporting the solution , open customization.xml and check the RibbonDiff tag to understand what is happening ?

  • nvrhughes Profile Picture
    nvrhughes 184 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

     Xavier Monin Bipin Kumar Thank you both. Have you ever un hid a button from ribbon workbench and still not have it display in Dynamics or re-appear in Ribbon Workbench? We had a hide action on the Focus View field that we un-hid, but it still wont show in Dynamics or RW. You can still see the hide action in debug but not RW. I refreshed Ribbon Metadata multiple times. 

    pastedimage1685020976029v2.png

  • Suggested answer
    XM-22040801-0 Profile Picture
    XM-22040801-0 11 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Hi,

    You can customize the Refresh button with a JS script that refresh data of the current record.

    If you call formContext.data.refresh(false), the data of the form will be refreshed without losing the current tab. This call will not reload the form, only the data.

    You can do it with Ribbon Workbench:

    1. Find the button named "Mscrm.Form.<your entity name>.RefreshModernButton".
    2. Right click => Customize Command
    3. Select Mscrm.Modern.refreshCommand
    4. Replace the web resource by your own and set your javascript function (See my JS file bellow).
    5. Publish
    6. If you get an error about "OrRule".
      1. Go to Mscrm.HideInOfflineAfter2022
      2. Remove the OrRule
      3. Add CrmOfflineAccessStateRule with State = Offline, InvertResult = True.

    The JS function:

    function refresh(selectedControl) {
        const formCtx = selectedControl;
        
        formCtx.data.refresh(false);
    }

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Hi,

    Instead of hiding oob button you can attach enable rule and add js code to always return false

  • nvrhughes Profile Picture
    nvrhughes 184 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Thank you Bipin Kumar Do you recommend hiding the current refresh using ribbon workbench? We previously have hid buttons using ribbon workbench ( Focus View button ) and then later un-hid but they still wont show in Dynamics. Microsoft said they do not support Ribbon Workbench so no one could help.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Hi,

    With oob button it will not be possible to achieve what you need

    How about creating custom button and 1. write Js code to get tab which is expanded and

    2. then refresh the form using core, 3. then set the tab expanded based on the value you have from step -1

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Refresh Screen from Ribbon and Stay on same Tab

    Hello,

    As far as I know, that's not configurable.

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans