Hi,
I am using "selectedItems" from the records selected in the Grid to enable a button in the sub grid,
if I included javascript to get the selectedItems in enable rules, on sub grid onload the javascript is firing and getting null reference to the "selectedItems" array returned.
Can we disable/enable the sub grid buttons through actions itself....becoz I need to get the selectedItems once I click on any subgrid record and not on grid load.
any alternate solution ?
*This post is locked for comments
if you have enable rule, and based on your condition yes it will disable your button.
Hi,
What if after comparison, if it returns false, does the button get's disabled if we
return false to the action ..I can't use PrimaryEntityTypeName for validation.. awaiting for your reply...
Yes, you can do that as well, you can utilize PrimaryEntityTypeName parameter, please check : msdn.microsoft.com/.../gg309332.aspx
Thanks for your reply,
Ok I am able to call custom js in actions to get the selectedItems once I click on a record in the grid, but after that I need to perform validation which type of activity it is,
can I do that within the same js within the action?
Yes, you can do that, you can have your js code, to check if there is any record selected only then run your custom logic.
Check this: nishantrana.me/.../enabling-button-in-subgrid-on-selection-of-record-selectioncountrule-in-crm-2011
ribbonworkbench.uservoice.com/.../129783-pass-the-currently-selected-grid-row-s-to-a-custo
Thanks
Please try below community blog that disable/enables the sub-grid button with custom actions only:
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156