crm 2011 get attribute value from custom ribbon button RRS feed

  • Question

  • Ok here is the scenario:

    • Want to have a custom button on the ribbon (e.g quote entity)
    • Button launches a silverlight application
    • Application does the necessary stuff etc

    Now i can do the above steps, what im wondering if its possible to pass through an attribute value from the record that the button is pressed from(in this case quote e.g pricelevelid)

    I can get the record id, using   <CrmParameter Value="FirstPrimaryItemId" />  but wanted to know if i can also get other attribute values.

    This would obviously same me time and resources from making another call to the same record to get the value i need.


    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Tuesday, May 10, 2011 4:05 AM

All replies

  • Hi,

    On custom ribbon button you can use custom Javascipt function. & use javascript funtion get the required attribute values & pass then to silverlight web resource in "DATA" paramter.

    e.g. window.open(Xrm.Page.context.getServerUrl() + "/WebResources/new_mySilverLightHTML?DATA=ID:" + Xrm.Page.data.entity.getId() + ",SLID:" + <Param1>)

    Thank you.


    Tuesday, May 10, 2011 4:56 AM
  • Hi there, i know i can do this..infact i can get the field value from my silverlight app too but was just wondering if there was a way to pass it from the silverlight app. Or is there a way to pass the record object through?Also in the above, given that im calling a javascript function from a button, is the function executed in the context of the record im in?i.e what will be Xrm.Page.data.entity.getId() be?If this is the case, then it makes it easy then :)
    http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/
    Tuesday, May 10, 2011 5:06 AM