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
Microsoft Dynamics

Avatar of undefined
Last Comment
MSCRMGEEK

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Chinmay Patel

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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
MSCRMGEEK

ASKER
This is needed to change the form through the plugin.
Chinmay Patel

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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
MSCRMGEEK

ASKER
yes