Posts

Xrm.Device.pickFile in D365 v9.0

Image
Introduction:   In this blog we will looking at an example to attach the uploaded files to notes using the Xrm.Device.pickFile function in unified Interface in D365 v9.0 Implementation: Step 1:  In this example we will create a button on the Contacts entity and we have written a JavaScript function to trigger on button click. In Ribbon Workbench after creating a button we created a command as shown below and added the command on the button. Step 2:  On clicking on the Upload button a dialog box opens and we can select the file we want, this file will then be attached in the notes section of the particular record.  Code: Hope this Helped!

Manage emails in Outlook quick tip (Send To One Note Feature)

Image
Introduction:  This blog is a quick outlook tip on how to manage your emails. Every project has a number of meetings, keeping track of all of them becomes difficult at the end if you need some details.  I recently have started storing my project related minutes of meeting in One Note just with a few clicks lets see how its done. Implementation: Step 1: In outlook click the "Send To One Note" in the top ribbon Here i have clicked this option from an email thread with multiple conversations. Step 2: Sign in and provide grant permission to One Note in the pop up shown Step 3: Click on the One Note notebook where you would like to save the email and click Save On clicking on save, the email thread will be saved in One Note as shown below, also if there is an attachment on the clicked mail, it will get saved as well. This is super useful as you can store all the minutes related to the project in One Note and you don't have to worry about searc...

[SOLVED] Report PDF Generation Issue in Dynamic 365 V9.0 using JavaScript

Image
Introduction: One of my clients had a requirement in Dynamics CRM v8.2 to simplify the report generation process. I added a button on the Quote entity which on click runs a report, captures its contents using JavaScript, converts it to PDF and attaches the PDF to an Email Record.  Recently after the upgrade to Dynamics 365 v9.0 the pdf generated was corrupted. To tackle this i had to make some changes to the code. Lets quickly walk through it.  Implementation: Step 1:  Below shown is the code used in Dynamics 365 v8.2 Step 2: After the upgrade to Dynamics 35 v9.0 the below error message shown while debugging  On further research we found the URL that the url has been changed. To fix it, just change the URL in the code to the following var pth = Xrm.Page.context.getClientUrl() + "/CRMReports/rsviewer/ReportViewer.aspx"; Hope this helped!

[SOLVED] Error "Verify the state of the solution in CRM" Package Deployer

Image
Introduction: In this blog we will discuss about the error(“Verify the state of the solution in CRM”) i faced while using the Package Deployer tool for Dynamics 365 Customer Engagement.    Solution: Step 1: In the ImportConfig.xml file we name we give the name of the solutionpackagefilename Then we build the project and copy the folder containing the solution and the Package.dll file created. Then we run the Package Deployer application and connect to the  organization the below screen shows the suction is successfully unpacked  But when the solution is imported the error shown is as follows In the Log file we can see that the import was not successful due to the missing dependencies Once the missing dependencies are added the solution is successfully imported using the package deployer. The depending components can also been seen if the solution is imported manually. Hope this small tip Helped!

Run Workflow directly from a button in Dynamics 365 Customer Engagement V9.0

Image
Introduction: In this blog we will demonstrate how to call a workflow directly from a button without any custom JavaScript code. Implementation: Step 1:  Create the required workflow. In this example i have created a  simple workflow on the opportunity and remember to select the  “As an on-demand process” option. Step 2:  After the workflow is created store the GUID of the workflow. To get the GUID select the workflow and copy down the ID from the URL as shown in the below image. Step 3:  Now create the custom button on Opportunity entity using Ribbon Workbench. Step 4:  Create a new Command and click on “Add Action>JavaScript Action” as shown in the image. Step 5:  In the library option write the following “ /_static/_forms/form.js ” and in the Function Name field “ Mscrm.FormAction.launchOnDemandWorkflowForm “. Then as shown in the above image add two Parameters as follows: Crm Parameter = PrimaryEntityTyp...

Call unbound actions in Dynamics 365 Customer Engagement v9

Image
Introduction:  In this blog lets look at how to call an unbound action using Xrm.WebApi which provides properties and methods to use Web API to create and manage records and execute Web API actions and functions in Customer Engagement Implementation The syntax for execute method is as follows: Step 1:  Create an unbound action. Here we created an action “new_ActionTest” and activated it. In the action steps we have written a step to create a new contact with the name “Jessy David”. Here in our action we an Integer parameter. Any steps can be added as required. Step 2:  Below shown code is function used to call the unbound action. Here “boundParameter” parameter is an optional String parameter, we have specified it as null as our action is not bound to any entity. “operationName” is an optional String parameter which is the name of the action.“operationType” is an optional Number parameter which indicates the type of operation we are execut...

Create and Associate Records in a single operation using Xrm.WebAPI in D365 Customer Engagement

Image
Introduction In this blog we will demonstrate how to create and associate records using Xrm.WebApi which provides methods to use Web Api to create and manage records. Implementation Step 1: The syntax to create a new entity record is as follows: Here entityLogicalName(string) and data(object) parameters are required where,  "data" is the JSON object defining the attributes and values for the new record. Step 2: In this example we will create a sample account record along with a primary contact for that account, associate an opportunity to the account and create task and notes for the opportunity all in a single operation. This type of process if called deep insert. The code for the same is as shown below: Screenshots: 1. A New Account is created with the name “CRAYONS LTD” and in the primary contact file the primary contact is set with the name Clinton Dmello as set in the code. 2. Also an opportunity is associated to the account as shown below in the associate...