locked
Getting Selected records from a view RRS feed

  • Question

  • Not sure how to ask this question but here goes,

    I have a crm view with x number of records. I'm attempting to write a plugin that will only use the records that are 'highlighted / selected'

    Does anyone know how to do this or point me in the right direction.

    Also is there a way of showing a specific view with all records ( ie over 250) or be able to 'highlight / select' all records over several pages?


    Dont ask me .. i dont know

    Tuesday, March 29, 2016 5:33 PM

Answers

All replies

  • Hello Pete,

    I believe that you should think on architecture of your customization.

    On one hand you have clientside scenario (like views, selected records e.t.c.). On other - you want to develop a plugin that's obviously serverside extension.

    Try to explain your goal to understand it and help you.

    Regarding your second question - I believe that right answer for you - usage of FetchXml of view you are working on - you don't need all records (because there could be millions).


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Tuesday, March 29, 2016 6:16 PM
    Moderator
  • Hi Andrii,

    Thanks for the reply

    The view is of banking record headers, and is linked to a child entity.  i.e. the header could be a summary of a banking file for supplier payments. The individual payment details are contained in the child entity  

    The reason for the plugin is to generate an APACS 18 formatted file to import into a 3rd party piece of banking software and is not something that can be done within the CRM framework. My plan is to have a 'button' on the view which will fire the plugin in and generate the external file for all the selected records. 

     


    Dont ask me .. i dont know

    Tuesday, March 29, 2016 7:13 PM
  • That sounds like scenario. So here are implementation steps:

    1. To pass selected records to handler of button you plan to add you can use following example - https://ribbonworkbench.uservoice.com/knowledgebase/articles/129783-pass-the-currently-selected-grid-row-s-to-a-custo

    2. Create an action that can receive as an input parameter collection of entities.

    3. Develop a JavaScript that will build request Xml and call action. You can use this article.

    4. Develop a plugin that will handle mentioned action and generate file you want.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Tuesday, March 29, 2016 7:39 PM
    Moderator