Skip to main content

Posts

Showing posts from December, 2021

Integrate LeadFeeder with Dynamics 365 CRM

  Leadfeeder provides details of companies visiting your website, you can integrate the same to D365 CRM.  STEP 1: Login to LeadFeeder; On the right corner click on your Account and then on Settings. You will see the below screen, click on Account to see all possible integrations.  Click on Dynamics 365 STEP 2: Follow the integrations given on the page, click on the solution to download and then import to your CRM Environment. After publishing, add your CRM URL on point 2 and click authorize on point 3. The Sync process will start and you will be able to see below screen  You can make changes to settings are per your requirements. The auto sync works once per day, you can choose to Sync now. In case of issues, you can Reconnect or Remove the Integration as well.

Create HTML Table from SharePoint List using Cloudflows

In this blog we are going to see how we can create an HTML Table from SharePoint List. Here is an example of SharePoint List.   Solution : You can trigger the flow as per your requirment. Also, in this example I am retrieving all items in the list, there are filter options avaliable. Use action: Get Items   We will first initialize an array variable and then append all list values to array variable in loop. Finally we create an HTML Table from the Array.     As per your requirment, you can populate the values in document instead of creating HTML table. Send the HTML table or Word Document in Email.

Reopen closed Appointment in D365 CRM using JavaScript

When an appointment is closed in D365 CRM, the appointment is not editable. There can be a requirement when Users wish to edit the closed appointment and add some missing data. This can be achieved by adding a new button on the Appointment form.   Solution :   Add a new button and use below JavaScript. var AppointmentForm =  {        setActive:function(primaryControl)  {         var formContext= primaryControl;         var status= formContext.getAttribute("statecode").getValue();         if (status==1)         {             formContext.getAttribute("statecode").setValue(0);             formContext.getAttribute("statuscode").setValue(1);              formContext.data.save();         }     } }  To understand the status and status reason details, you can refer the Microsoft document- https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/appointment?view=dynamics-ce-odata-9   Note that, you need to update both statecode and statuscode, tryin

Capture Case Resolution data before reopening case using C#

  When we reactivate cases, the old case resolution record is set as cancelled and a new case resolution record is created, before you re open the case, you can actually store case resolution data, which you can later use when you re-close the case.   Solution : Below is the code to get case resolution data      private void GetCaseResolutionData()         {             string resolutiondata = null, Remark=null;             try {                 EntityReference currentEntity = (EntityReference)context.InputParameters["Target"];                 Entity Case = service.Retrieve("incident", currentEntity.Id, new ColumnSet(new string[] {"statuscode"}));                 Guid CaseID = currentEntity.Id;                 string ResolutionType = Case.FormattedValues["statuscode"];  //case resolution dropdown formatted value                 int Resolutionvalue = ((OptionSetValue)Case["statuscode"]).Value; //case resolution option set value          

Retrieve Email Recipients (TO, CC, BCC) in Cloud Flow

When we trigger a flow on Email Activity or retrieve email activity. However that does not provide us the recipient details of the email. Recipient details are stored as part of Activity  Party.    In this blog, we will understand how to retrieve the Email Recipients from the activity party of the email.   Solution: From Email messages you will get activity party. Reterive Activity Parties of that ID. Use Filter Array Action to get only the type of recipient you need. If you do not know the Partition type mask, you can check the output of List rows and read the formatted value. The Filter array output will you party type and party ID. In my case the party type was Users so I have used Party ID as input to get the User record.   Based on your party type and requirements, you can make use of the party id value which basically is your recipients 

Send Email to not resolved Email Ids from Workflow/Cloud flows

In Dynamics CRM we can easily send emails from Workflow and Cloud flow to users, Account and Contacts, but there can be situation where we need to send email to particular IDs, which are not part of any CRM records. Basically, these ids cannot be resolved to Account, Contact or User entity. Solution : We need to make changes to system settings to allow messages to unresolved recipients   In case of Workflow, directly add email address in the field( It will show ? as it is not resolved address)   For Cloud flow, in create a new email record, click on "Switch to Input entire array", populate the email in addressused field. This will let you send emails to an unresolved email address.

Dynamic, Multiple Recipients of D365 Email in Power Automate

When t he activity parties (TO, From, CC) ae static, we can easily send emails. However here is how we can set the activity party dynamically on the Email.    In above screenshot we can see the Activity party attribute is populated for single value and is static to only a single entity record GUID.   Solution: The create a record of Email message is as below, here we are entering the attributes of activity party, by clicking on "Switch to Input entire array" You will get the Array format, the participationtypemask is TO, FROM,CC while the partyid@data.bind is the email address. Now all you need to do is create a dynamic array, You can use append to array variable action to create an array with participationtypemask as per your requirement. Example: get all users whom you need to send email, append the user id to array. pass this array as input to the Activity Parties field in create an email record.  

Time Out and Retry Policy in Power Automate

  While using Power Automate actions, you may need to retry or set timeout for your actions.   Solution : For Create, Update, Delete, Send HTTP request, Do Until Actions, simply go to Settings In Settings, you will find Timeout and Retry Policy options. Time Out: For the duration specified, the action will wait and then time out. Here P1D means 1day.  For minute- specify P1M and S for Seconds.   Retry: You can set the retry policy. There are 4 types: Default- The default is an exponential interval policy set to retry 4 times. None- Do not Retry Fixed Internal-  Count( No of times to retry), Interval( time between retry).   Exponential Interval-  Count(No of times to retry),  Interval(Time between retry) Minimum and Maximum Interval (the Retry will happen exponentially[Increase or decrease] between the specified intervals) Eg: If Interval is 1H and minimum Interval is set to 1M- it will decrease exponentially till it reaches 1M.

Filter/ Set Default Required Attendee field using JavaScript

  Introduction : Here is JavaScript code that you can use to  make the required attendee field show only system user records and also in case you have a requirement to the set the owner of record as default required attendee refer code below.   Solution : Add below function to your web resource on load event of add.       filterrequiredattenees: function (exec Context)  {         var formContext = execContext.getFormContext();         formContext.getControl("requiredattendees").setEntityTypes(["systemuser"]); //filter the required attendees to show only records from system user entity.               if (formContext.getAttribute("ownerid").getValue() != null)  {             ownerid = formContext.getAttribute("ownerid").getValue()[0].id.replace("{", "").replace("}", ""); // remove the brackets from ownerid var value = new Array();                       value[0] = new Object();                       value[0].i

Get Business Process Flow Stage Id using API Query

Developers may need to get the stage ids of BPF stages in order to use in power automate or JS. Here is a blog that will help. API Query-   https:// CRMURL.dynamics.com/ api/data/v9.0/processstages?$select=stagename&$filter=processid/workflowid eq BPFGuid   Eg: 1) Get the GUID of  Business Process Flow whose stage details you need. Replace below Query with Your CRM URL and BPF GUID. https://Test130.crm.dynamics.com/ api/data/v9.0/processstages?$select=stagename&$filter=processid/workflowid eq 9128E4D1-1234-4852-ABD0-A63A6ECA5C5D   Output:    The output will provide the stage name and ID.