Get/Read Selected Record Information From Main View Or A Sub-Grid using Ribbon Workbench In D365 CRM | CloudFronts

Get/Read Selected Record Information From Main View Or A Sub-Grid using Ribbon Workbench In D365 CRM

There is a common application of getting selected records information while working with custom buttons using Ribbon Workbench.

Use Case:

We had a requirement, where we needed the information of the all selected records from the Main View and Sub-Grid of an entity. We can achieve in Ribbon Workbench.

Steps:

1. The button on which we are customizing is named as “Submit”.

2. In the Command section, click on “Actions” -> “Javascript Action” to add Custom Javascript. Then click on “Add Parameter” -> Click on “Crm Parameter” -> then on  SelectedControlSelecteItemReferences.

SelectedControlSelecteItemReferences = grabs the information of all selected record from the view.

3. SelectedControlSelecteItemReferences will pass the information of all the selected records in my “selectedItems” variable passed to the method.

4. On clicking the Submit Button, the selected records information will be passed on to the Javascript Code.

5. On clicking the “Submit” button, it will pass the two selected records information to the method that the button is calling.

6. You can further read all the information from the Array and perform the actions that you want.

Note: This can be done in Sub-grids of the forms also.

Conclusion:

Hope this blog helps to get/read the selected Information from the Main View or Sub-Grid


Share Story :

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close