locked
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. 

    </Actions>

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

    ----------

    showGuid: funciton(selectedId){


    alert(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


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    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
    Answerer
  • 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 

    PrimaryItemIds

    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