Dynamics CRM Custom Entity Form JavaScript
I have an entity form customization that adds an extra tab to my Contact entity form.
I have custom JavaScript that I'd like to execute when the window loads and populate this tab (which is not yet selected).
Is there a place I can register this JavaScript so that it fires when the Contact windo开发者_Python百科w loads?
Thanks.
Yes you can. See this article for detailed instructions:
http://www.sonomapartners.com/Services/CRM/microsoftcrm4-formonload-example.aspx
The basic idea:
Navigate to Settings -> Customization -> Customize Entities. Double click the Contact entity. The entity editor will appear.
Click Forms and Views. Double click Form. The form editor for the contact entity will appear.
Click Form Properties and the editor window will appear. From here, you see that you can choose to add a script to the form OnLoad or OnSave event.
Select OnLoad and click Edit.
Paste your script in and make sure you publish the entity to apply the change by going to Actions -> Publish in the top tool bar.
To inlcude javascript file in a solution have to added in the WebResources section
To handle JScript files or any other web resource try using XrmToolBox, is compatible with several CRM versions and have a lot of other useful tools in it.
hope it helps
精彩评论