Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 154803

Forum Post: How to connect JS web-resource to HTML web-resource correctly

$
0
0
Hello everyone. I need to create html button on some form of 'contact' entity and add to it some logic. Also I need separate all my JS from html. First things first I created html web-resource with this code: Copy address . . . After it I wrote this JS with namespaces in separate web-resource: var D A = D A || {}; DA . CRM = D A . CRM || {}; DA . CRM . Contact = D A . CRM . Contact || {}; DA . CRM . Contact . FormScripts = { some : function ( xrm , formContext ){ window . Xrm = xrm ; window . _formContext = formContext ; alert ( " hello world " ); } . . . I have two questions: 1. How I should write the path of JS web-resource for ? I tried this wariants: - - - - - All of them didn't work 2. How I should call my method considering that it is inside namespaces? I mean in this row: Copy address . Something like this DA.CRM.Contact.FormScripts.some()?

Viewing all articles
Browse latest Browse all 154803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>