Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Passing CRM Parameters though Ribbon Workbench Custom Button to Javascript Functions to Get Attribute Values

(0) ShareShare
ReportReport
Posted on by 70
  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Passing CRM Parameters though Ribbon Workbench Custom Button to Javascript Functions to Get Attribute Values

    Hi,

    Great!

    By the way, when dealing with just one record (button is on the form not on the grid), using formContext to get id is a good idea (no need to pass FirstPrimaryItemId or any other parameter as you ready for the context, it makes it more simple).

    To make it easier for the other readers, please make the appropriate answer as verified (click 'Yes' under 'Did this answer your question?')

  • Jeffrey O Profile Picture
    Jeffrey O 70 on at
    RE: Passing CRM Parameters though Ribbon Workbench Custom Button to Javascript Functions to Get Attribute Values

    Thanks Wahaj.  I ended up just passing the FirstPrimaryItemId which was simple enough and is working now.

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Passing CRM Parameters though Ribbon Workbench Custom Button to Javascript Functions to Get Attribute Values

    Hi,

    Thank you for your query?

    Where is this button? On the form or a home/sub-grid?

    Please note, SelectedControlSelectedItemReferences parameter is meant to be used when you are selecting one or more records on a grid (and your button appears on the View/Grid).

    If your button is on the form, you can get the current record id using the form context:

    formContext.data.entity.getId();

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,488 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans