Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Ribbon workbench - opening a URL and passing through a parameter

Posted on by Microsoft Employee

I am attempting to open a URL (Document management system) from a button on my ribbon.

What I need to do is take the Reference from the screen, pass it through, then open a document relating to this reference from the document management system.

I've tried doing it using the URL Action command. How do I pass through the Reference and what parameters do I use?

Also tried doing it with the JavaScript option, again not sure what paramters to use.

If anyone could assist please let me know.

*This post is locked for comments

  • Suggested answer
    sandeepstw Profile Picture
    sandeepstw 4,601 on at
    RE: Ribbon workbench - opening a URL and passing through a parameter

    Hi,

    You need to take help of Ribbon

    ribbonworkbench.uservoice.com/.../129783-pass-the-currently-selected-grid-row-s-to-a-custo

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Ribbon workbench - opening a URL and passing through a parameter

    Hi,

    Ribbon workbench does not have the facility to pass any parameter you need to call only JS function in the Ribbon action where you pass the parameter using query string or as a parameter using OpenEntityForm.

    So create a JS web resource and add  one function there . In the function  get the value from  using    window.paremt.Xrm.Page.getAttribute("FieldName").getValue() and append the value to the URL or you can use openEntityForm.

    Please refer below reference  -

    msdn.microsoft.com/.../gg334375.aspx

    Hope this helps.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Ribbon workbench - opening a URL and passing through a parameter

    Hi,

    Assuming you want to open SharePoint location record?? you can write a JS method for this where you need to form the SharePoint URL, depending on the entity, for example below code will open case folder location

    // geting sharepoint doc folder location

    casetitle = Xrm.Page.getAttribute("title").getValue()

    spURL = "cncdev.sharepoint.com/incident";

    caseId = Xrm.Page.data.entity.getId().replace('{', '').replace('}', '').replace('-', '');

    caseId = caseId.replace(/-/gi, '');

    var loc = spURL + casetitle + "_" + caseId;

    reference: community.dynamics.com/.../159071

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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans