Link to home
Start Free TrialLog in
Avatar of MSCRMGEEK
MSCRMGEEK

asked on

ms dynamics crm 2011 - is there any sample plugin code for adding available html web resource to the section in the entity form?

Hi,

ms dynamics crm 2011 - is there any sample plugin code for adding available html web resource to the section in the entity form?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MSCRMGEEK
MSCRMGEEK

ASKER

Hi Chinmay,

Thanks for your response.

Following is the scenario

1) Actually we will bundle the solution and provide the solution to the client.

2) This Solution will contain the following:

  i) The Custome Entity say ConfigEntity
  ii) Also, it contains the html web resource. which need to be added where ever required by the client.
  iii) When the solution is imported by the client, they will get Custom Entity and html web resource loaded in the CRM System.
   iv) Now user can add record details to the custom entity(ConfigEntity Form).
   v) In the fields in the Custom Entity, there is one field (Schema name of the Entity) where client can enter Schema Name of the Entity.
   vi) Now, let us say client enters schema name as "xyz", then in the xyz entity, the html web resource need to be added.
   viii) If in the next record in the field(Schema Name) of the Entity Form, if client enters "Accounts" then for the Accounts Entity, html web resource need to get added.

Thanks
This is needed to change the form through the plugin.
Hi MSCRMGEEK,

I do not think this is something you could achieve using a Plugin. I understand you want to add a webresource to an entity's form. But an entity can have multiple forms so this will be a challenge. Also a plugin only executes when you perform an operation that executes on Server.

If you still want to go after this approach then after user enters name of the schema S/he has to save the record.

Once the record is saved you could manually retrieve FormsXml from CRM database and then parse the XML, find the section where you want to add the webresource and after adding the appropriate XML to FormsXml you can save it back to the database.

Regards,
Chinmay.
yes