Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Cannot get jsignature web resource working in CRM 2013 Online

$
0
0

We are trying to use jsignature to capture customer signoff inside CRM, we are trying to follow this tutorial

http://blogs.msdn.com/b/devkeydet/archive/2014/06/25/capturing-a-signature-in-a-crm-form-using-html5.aspx

so far we have added the HTML code from that page into a web resource inside CRM Online, and we have also uploaded the js files as well. The code is below.

<html><head>
     <title>Signature</title>
     <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.min.js" type="text/javascript"></script>
     <script src="</script">https://myorg.crm4.dynamics.com//WebResources/new_jsigmin"></script>
 <meta charset="utf-8"></head>
     <body>
         <img id="sigImage" style="display: none;" alt="This is an image of the persons signature.">
         <div id="sigPanel" style="display: none;">
             <div id="signature"></div>
             <button id="clear">Clear</button>
         </div>
         <script type="text/javascript">
             $(function () {
                 var sigImage = $("#sigImage");
                 var sigPanel = $("#sigPanel");
                 var sig = $("#signature");
 
                 var Xrm = window.parent.Xrm;
                 var sigBase64Attribute = Xrm.Page.getAttribute("new_esig_data");  //replace this with your hidden "multiple lines of text" field with a max length of 1,048,576
                 var sigBase64Value = sigBase64Attribute.getValue();
 
                 sig.bind("change", function (e) {
                     sigBase64Attribute.setValue(sig.jSignature("getData"));
                 });
 
                
                 if (sigBase64Value != null) {
                     sigImage.css("display", "inline");
                     sigImage.attr("src", sigBase64Value);
                 } else {
                     sigPanel.css("display", "inline");
                     sig.jSignature();
                     $("#clear").click(function() {
                         sig.jSignature("clear");
                     });
                 }
             });
         </script>

</body></html>

this is not working at all inside CRM, all I can see is a blank area inside the Web resource field on the entity form. I am by no stretch of the imagination a js or CRM developer so any assistance would be greatly appreciated.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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