locked
How to call a plugin in Custom Button Under Add Existing C# RRS feed

  • Question

  • Hi ,

    I need to call a plugin in custom button in add existing of contact Entity . I need to select contact record once i click send email (custom button) my custom plugin has to trigger . .? ? ? ? 
     * How to retrieve selected contact  record id and to pass to my  Plugin

    Grateful for any help!!

    Tuesday, August 27, 2013 5:44 AM

Answers

  • You can pass the "SelectedRecordIds" or something similar to the JavaScript function as a parameter, which is an array of all the selected contact ID's.

    http://andreaswijayablog.blogspot.co.nz/2011/07/crm-2011-custom-button-on-custom-entity.html

    Once you have the ID's, you can trigger a workflow using JavaScript for each selected contact, the workflow can set a hidden field on the contact, which the plugin triggers onchange of to perform your logic.

    Alternatively you could skip the workflow step and update the hidden field on the contacts directly using REST JavaScript.

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by kMAT1 Tuesday, August 27, 2013 1:27 PM
    Tuesday, August 27, 2013 6:32 AM

All replies

  • You can pass the "SelectedRecordIds" or something similar to the JavaScript function as a parameter, which is an array of all the selected contact ID's.

    http://andreaswijayablog.blogspot.co.nz/2011/07/crm-2011-custom-button-on-custom-entity.html

    Once you have the ID's, you can trigger a workflow using JavaScript for each selected contact, the workflow can set a hidden field on the contact, which the plugin triggers onchange of to perform your logic.

    Alternatively you could skip the workflow step and update the hidden field on the contacts directly using REST JavaScript.

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by kMAT1 Tuesday, August 27, 2013 1:27 PM
    Tuesday, August 27, 2013 6:32 AM
  • Hi,

    Is it possible to open a record using C# plugin.

    using Javascript we can open a record in CRM .

    but i need to open using C# plugin . . 

    Grateful for any help!!

    Tuesday, August 27, 2013 1:31 PM