{"id":14290,"date":"2007-03-22T11:57:00","date_gmt":"2007-03-22T11:57:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/crm\/2007\/03\/22\/custom-html-for-crm\/"},"modified":"2023-05-31T15:32:26","modified_gmt":"2023-05-31T22:32:26","slug":"custom-html-for-crm","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/dynamics-365\/blog\/no-audience\/2007\/03\/22\/custom-html-for-crm\/","title":{"rendered":"Custom HTML for CRM"},"content":{"rendered":"
Many CRM customers find very handy the use of IFrames to incorporate Web pages into CRM forms. However, each time a new piece of custom HTML\/Javascipt code needs to be added to the main body of a CRM form a new web page needs to be created and properly referenced in the IFrame. This won\u2019t typically represent too much trouble for a System admin who has access to the web server where the extra pages will be hosted; but what if we want to create a library of HTML \u201cparts\u201d that can be incorporated in more than one form or displayed as a standalone web page AND we don\u2019t want the customizer to have access to the web server?; this scenario is typical for hosted CRM solutions.<\/p>\n
The following mini-tutorial shows a basic technique to achieve the above in CRM 3.0. Included in this post is a zip file containing the files mentioned here. The sample code is at the CRM Sandbox in the downloads section.<\/p>\n
HTML custom entity<\/b><\/p>\n
1. The first step is quite simple; we need to create a new custom entity that we\u00a0will\u00a0call\u00a0HTML_Cell<\/b> with at least 3 attributes:<\/p>\n 2. Next we’ll\u00a0edit the entity\u2019s form\u00a0to expose all three attributes making sure to mark URL as disabled. The form, once rendered, will look similar to the following:<\/p>\n\n
\n
\n
\n
\n
\n