set entity profile image using javascript . convert image to base64 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/set-entity-profile-image-using-javascript-convert-image-to-base64/ Microsoft Dynamics CRM . Microsoft Power Platform Tue, 01 Sep 2015 12:52:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 set entity profile image using javascript . convert image to base64 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/set-entity-profile-image-using-javascript-convert-image-to-base64/ 32 32 176351444 Set Profile Image / note attachment using javascript / jquery in mscrm http://microsoftdynamics.in/2015/09/01/set-profile-image-note-attachment-using-javascript-jquery-in-mscrm/ Tue, 01 Sep 2015 12:52:00 +0000 http://microsoftdynamics.in/2015/09/01/set-profile-image-note-attachment-using-javascript-jquery-in-mscrm/ Below code convert image from upload control and convert it into base64 which can be directly set to the image field / notes etc ,  function uploadprofilepic(){      var imgvar = new Image();         imgvar.src = SourceOfFile;         imgvar.onload = function () {          ...

The post Set Profile Image / note attachment using javascript / jquery in mscrm appeared first on Microsoft Dynamics 365 Blog.

]]>
Below code convert image from upload control and convert it into base64 which can be directly set to the image field / notes etc ,

 function uploadprofilepic(){
     var imgvar = new Image();
        imgvar.src = SourceOfFile;
        imgvar.onload = function () {              
         var canvas = document.createElement(“canvas”);
         canvas.width = this.width;
         canvas.height = this.height;
     
         var ctx = canvas.getContext(“2d”);
         ctx.drawImage(this, 0, 0);
         var dataURL = canvas.toDataURL(“image/png”);
      var base64Image = dataURL.replace(/^data:image/(png|jpg);base64,/, “”);
Now This base64Image can be set Directly to Imageprofile of an entity .
entityimage = base64Image ;
Hope this Helped Thanks for the Support .


SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Set Profile Image / note attachment using javascript / jquery in mscrm appeared first on Microsoft Dynamics 365 Blog.

]]>
2792