0

I wonder if there is a way to show CRM 2011 forms (like the information form of the contact entity) on an aspx page?

I want to build a customer portal (asp.net) which shows exactly the fields which are configured in the CRM itself.

Any suggestions?

Cheers

luke0815
  • 109
  • 1
  • 9
  • Sounds like you need to keep the data within CRM and have it synced across to another server (perhaps in a DMZ) to display. Is that what your after? – Kye Sep 19 '14 at 11:16

1 Answers1

0

You have a few options:

  1. Put an iframe to your ASPX page and point it to the CRM form url. The URL has following format:

    http://myhost.com/ORGNAME/main.aspx?etn={ENTITYNAME}&pagetype=entityrecord&id={ENTITYGUID}

  2. Use CRM database views (or CRM webservice) directly from your application. Configure datasource to CRM database

Downside of the first solution is that users will be probably asked for credentials (you will probably want to introduce SSO) and if the CRM is running on different domain it will be a bit difficult to ensure JavaScript communication between your page and the iframe. However, not impossible - http://easyxdm.net/wp/. Advantage is that it's pretty easy to build.

The second solution is more work but on the other hand you have everything under control.

Community
  • 1
  • 1
rocky
  • 7,506
  • 3
  • 33
  • 48
  • Hi rocky, thank you for your answer. I was already aware of the solutions you posted. But what I try to accomplish is the following: I want to have a CRM Form or View where a Poweruser can add and remove fields. This fields should be shown in the portal as well without source code modification. I agree that 1. would be an solution for that, but as you said I would face some problems with credentials. Furthermore I would like to style the form which gets displayed on the aspx page with css. Is there a way to get the metadata of a CRM form (like: this form displayes this fields, etc.)? – luke0815 Sep 22 '14 at 07:49
  • I think even if there was it's not a way anyone would want to go :) There will be so much logic and overhead around those forms that you just don't want to reinvent it. If I were you I'd go with the first solution. If you dive into it it's not that hard to ensure cross-domain JS communication between two window objects - especially if one of them is an iframe. postMessage API works reliably in this case (unlike between two separate windows in ie :)). So with some effort you'd be able to style the form. – rocky Sep 22 '14 at 11:56
  • But of course you can retrieve field metadata using: var result = (RetrieveEntityResponse) organizationService.Execute(metadataRequest); var metadata = result.EntityMetadata; – rocky Sep 22 '14 at 13:50