Best way to call JS functions from HTML web resource in v.9

55 views
Skip to first unread message

vijay kumar

unread,
Jul 18, 2019, 5:06:39 AM7/18/19
to Curso de Microsoft Dynamics CRM
Hi,

I have a case, where I have to make custom pop up message, allowing user to select between sending mail without attachments (and on button click the workflow sending mail should be fired), or opening mail form (on button click) and sending mail manually. Is it even possible to run JS from HTML not in a form container now?

Vikranth Sinha

unread,
Aug 13, 2019, 2:39:37 AM8/13/19
to Curso de Microsoft Dynamics CRM
Hi,

You can call the script function from HTML web resource.
In HTML page do refer to the script file location in Script tag.
Refer below code:
<!DOCTYPE html>
<html>
<head>
    <title>Allocate LED for Match</title>
    <meta charset="utf-8" />
</head>
<body>
<script type="text/javascript" src="../WebResources/pro_TestServices.js"></script>
 
</body>
</html>

And in Script file write script function code:
Refer code below:
// pro_TestServices.js
function Testfunction()
{ alert("test function");
}
On button click in HTML web resource, you can call the function from TestServices.js script file.

If you still need help regarding Dynamics CRM Technical Support feel free to contact me.
Reply all
Reply to author
Forward
0 new messages