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)

pass parameter in ribbon button in dynamics crm by workbench

(0) ShareShare
ReportReport
Posted on by 1,562

Hello All,

I want to pass parameter in ribbon button in dynamics crm by workbench tool.

please guide me soon.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi Tin,

    in the ribbon workbench, you have to add a button to the commandbar. To that button you have to assign a command. In the command you have to specify the action (either javascript or url). In that action you can add the parameters.

    In case of a javascript call, the sequence of the parameters has to match with the sequence of parameters the javascript function is expecting.

    With regard to the parameters you pass, you can pass contact values or dynamic values (like current record etc)

    I hope this guides you in the right direction

    Bas

  • Tin Profile Picture
    1,562 on at

    Thanks Bas,

    I want to pass current Account id and account name here i am not find how we can pass current value.....

  • Verified answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi Tin,

    You can pass the account id, you need to resolve the name later on in on the webresource form.

    I enclosed a screen shot in what you need to choose to pass the ID of the entity. You have to add a parameter of the type CRM Parameter. Then in the picklist, you need to select FirstPrimaryItemId

    Good luck

    Bas

  • Tin Profile Picture
    1,562 on at

    Screenshot is not visible.

    And i had added a parameter of the type CRM Parameter.

    Now i find so many option here ,I am selecting FirstPrimaryItemId.

    Is FirstPrimaryItemId is a Account guid?

    If yes cool ............then on other hand i also want to access Account name as well.

    please help me.

  • Community Member Profile Picture
    on at

    Hi,did u get solution to get account Name in parameter of open url action...

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Tin,

    I would suggest you to use javascript to pass parameters. As I know you can pass recordId but not name. Here is what I use to pass parameters;

    function RibbonClick() {
        var parameters = {};
        parameters["targetfieldname1"] = Xrm.Page.data.entity.getId().toString().replace("{", "").replace("}", "");
        parameters["targetfieldname2"] = Xrm.Page.getAttribute("name").getValue();
        Xrm.Utility.openEntityForm("entitylogicalname", null, parameters);
    }


    Hope it helps,
    Regards
    Please verify if it helps

  • Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Ezgi HAGLUND

    May you please explain more.? I also have the same problem. I have a JS that needs entity Id to trigger workflow on a button. I have a button as shown below on the home page:

    6558.TemplateButtonLabels.jpg

    Thank You

  • Suggested answer
    Community Member Profile Picture
    on at
  • Community Member Profile Picture
    on at

    How do I pass current entity's logical name as parameter to ribbon workbench?

    Regards.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Vivek,

    Can you please try following steps on RibbonWorkbench..

    1-

    8015.Ekran-Al_3101_nt_3101_s_3101_2.PNG

    2-hit Add and then select CRM Parameters and hit Ok

    8015.Ekran-Al_3101_nt_3101_s_3101_2.PNG

    3-

    Ekran-Al_3101_nt_3101_s3.PNG

    Hope it helps!

    Regards,
    Ezgi

    Please verify if it solves your problem.

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