Custom ASPX Page RRS feed

  • Question

  • We have been asked to build a custom "lookup" window that connects to an external business system (ie outside of CRM 2011) and displays certain data from that system.  The customer will click a button in CRM which will open this ASPX page and when they have selected a record, data will be updated in CRM and certain information from that record will be copied to a CRM form.

    Here are the steps we were thinking:

    1) Add a button to custom form

    2) Add a call from the custom button to a JavaScript method on the custom form that will
         a) close the custom form
         b) open the .ASPX webform that contains a webgrid that displays data from an external data source

    3) Once the user selects a record from the webgrid we will
         a) close the ASPX page
         b) update some CRM data fields based on the selected record
         c) open a new CRM form and populate the fields with the values from the selected record on the ASPX page

    The reason we are looking at using an ASPX page rather than an HTML resource is that we have some additional interface complexity (paging, searching etc) on our custom lookup page and we feel more comfortable developing this logic using server side ASPX rather than client side HTML.

    My question at this point is what is the best way to build an ASPX page that can handle steps 3B and 3C?  Specifically, how do we build a webform that can be called from CRM, update data in CRM, and also open a page and default value on a CRM window?  Are there any examples in the SDK or online that show these steps?

    In case it matters, this is an on-premise deployment.

    Thank you

    • Edited by Cipher Monday, August 12, 2013 1:55 AM
    Monday, August 12, 2013 1:53 AM

All replies

  • Hi.

    Even you feel comfortable, I would still not suggest using ASPX page for hosting reasons and security concerns.

    If server side code is your strong points, you could achieve much of the logic using Silverlight with some quite mature Silverlight controls out there.

    Since Silverlight can be hosted as a web resource in CRM 2011, you can directly access CRM API and do CRUD

    Hope this helps.


    Tuesday, August 13, 2013 10:29 AM
  • Step 3b is farily straightforward in ASPX, as you'd just use the SDK assemblies to communicate with CRM. The only hard part is if you use Claims authentication, and you want to impersonate the CRM user when communicating with CRM - to do this invloves some custom setup in ADFS.

    Unfortunately your step 3c is difficult with ASPX, as the only supported way to deploy ASPX extensions is in a separate web site from CRM, and you run into cross-domain restrictions in the browser.

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, August 13, 2013 2:04 PM