Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Call Custom Action through Custom Ribbon Button In main grid using Javascript

(0) ShareShare
ReportReport
Posted on by 1,197

Hi Everyone  ,

      I want to call a custom action from the custom ribbon button  which is in main grid using javascript and I am confused what to do... Please Help!!

 Thanks.

      

*This post is locked for comments

  • TNS Profile Picture
    1,197 on at
    RE: Call Custom Action through Custom Ribbon Button In main grid using Javascript

    ok.. I try it..

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Call Custom Action through Custom Ribbon Button In main grid using Javascript

    If your Action is entity-specific you will have to pass entity id.

    If you don't want your action to entity-specific and pass an array of selected records you will have to recreate Action as Global.

  • TNS Profile Picture
    1,197 on at
    RE: Call Custom Action through Custom Ribbon Button In main grid using Javascript

    yes .its entity specific and I have all the selected record Ids also,...Now what I am trying to do  is on the click of my custom ribbon button I  want to call custom action which will create a record on another entity and place all the ids in a field I have created , for that I have used input argument in action to hold the ids.

       So, I have a confusion that is it necessary to pass a entity record id ... to call a action because  there is no use of entity name or entity record id ...

       it will be very helpful , if you can clear my doubt.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Call Custom Action through Custom Ribbon Button In main grid using Javascript

    Is you action global or entity-specific?

    If it is global - there is an example how to call global action in the same article.

    If it is entity-specific I believe you want to run action against selected record(records). To get selected records ids check following article - ribbonworkbench.uservoice.com/.../129783-pass-the-currently-selected-grid-row-s-to-a-custo

  • TNS Profile Picture
    1,197 on at
    RE: Call Custom Action through Custom Ribbon Button In main grid using Javascript

    Hi Andrii,

                I read this article ..and others  there they are using the record id as in the article you have send to me :::::   var query = "accounts(DE57510E-59A3-E511-80E4-3863BB35AD90)/Microsoft.Dynamics.CRM.new_TestAction";

    the id of  the record is given..  I stuck here which record id I should give  because I want to call custom action from custom ribbon button which is in the main home grid .. not in the form.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Call Custom Action through Custom Ribbon Button In main grid using Javascript

    Hello,

    What exact issues do you have?

    You can use following article as example - debajmecrm.com/.../invoke-your-custom-action-from-dynamics-crm-web-apidynamics-crm-2016

    If you have issues please be more specific describing your issue.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans