How to Create a Silverlight Web Resource that Interacts with CRM 2011 Form Fields RRS feed

  • Question

  • Hi All

    I have the requirement to display the selected items in the MS CRM text (multi-line) field from the Silverlight listbox .I am following the below link to develop. but unable to show the selected items in the ms crm text field.


    Any help greatly appriciazted...


    Srikanth Reddy

    Friday, November 15, 2013 11:19 AM

All replies

  • Hi,

    You can use dynamic types to access the Xrm objects. So in your Silverlight code you would use:

    dynamic xrm = (ScriptObject)HtmlPage.Window.GetProperty("Xrm");
    // get an attribute
    var attribute = xrm.Page.getAttribute("someattribtue");

    You then use the Xrm api as described by the SDK - http://msdn.microsoft.com/en-us/library/gg334351.aspx



    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, November 15, 2013 12:28 PM
  • Hi Scott,

    Thanks for your quick response! I am able to get the "XRM" object in silverlight application but how can we display the selected items in the "text" field(ms crm) from the listbox(Silverlight)...further please find the above link for silverlight listbox example..

    Friday, November 15, 2013 3:13 PM
  • You can set value by using setValue

    dynamic xrm = (ScriptObject) HtmlPage.Window.GetProperty("Xrm");

    xrm.Page.data.entity.attributes.get("attributename").setValue("Text Value");

    Thomas T(MCBMSS) If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Monday, November 18, 2013 5:32 AM