Selected record from the sub grid returning null ?? RRS feed

  • Question

  • I am trying to get the Guid of the selected record on click of a ribbon button in 2013. I am using <crmparameter> in ribbon customization. 


    <JavaScriptFunctionLibrary="$webresource:new_ShowMessage" FunctionName="showGuid">
          <CrmParameter Value= "SelectedControlSelectedItemIds" />


    showGuid: funciton(selectedId){



    Here selectedId returning null ??!! I tried with 

    Value ="SelectedControlSelectedItemCount" still it's the same issue..

    any thoughts on this ???

    • Edited by Pradeep47 Saturday, March 8, 2014 2:00 AM
    Friday, March 7, 2014 2:40 PM

All replies

  • Hi,

    I did a post about this a while ago - see http://ribbonworkbench.uservoice.com/knowledgebase/articles/129783-pass-the-currently-selected-grid-row-s-to-a-custo

    You need to use SelectedControlSelectedItemReferences which will then pass an array to your javascript.

    Hope this helps,


    Scott Durow
    Blog www.develop1.net    Follow Me
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, March 7, 2014 3:41 PM
  • I tried SelectedControlSelectedItemReferences this is returning undefined ... 

    not really sure what's really going wrong with this :(

    Friday, March 7, 2014 4:51 PM
  • Only PrimaryItemIds returning the Guid's ?? what  exxactly PrimaryItemIds   means ??

    from SDK 


    A string array providing the GUID Id values for the Primary Item.

    so what is Primary  Item here ??  how it is different from SelectedControlSelectedItemIds ??  can some one explain please ??

    • Edited by Pradeep47 Saturday, March 8, 2014 2:23 AM
    Saturday, March 8, 2014 2:12 AM