Posts

Showing posts from July, 2022

Advance Find in D365 CRM

Image
 In this blog we will try to understand Advance Find in Dynamics CRM. After you click on the funnel, a new window "Advance Find" opens up. If we select any existing view, the filter is not editable, click on Details to edit the same. Let as an example create a new view for Account Table with filter created by equals current user. Click on New or select new from the "Use Saved View" dropdown. Select the field and the filter condition Click on Results , to view records created by current user There are also a list of options/tools that we can perform on the results. Majorly used options are Run Report, Run flow, Export Data. We can also create new record or set regarding to record from here. We can go back to the query by clicking on Advance Find. Click on Save to Save the view, here we are asked for View name and description. If we edit an already existing view, we will have to click Save As to save the view as new. We can see our saved view by clicking on Saved Vi...

The supplied reference link is invalid Error in Cloudflows

Image
  Introduction :  When we add a new row in dynamics CRM, we might end up using the lookup data reterived in previous action. There might be times when the previous record has returned a null. In such cases we get the error-    {    "error" : {      "code" :  "0x0" ,      "message" :  "The supplied reference link --  contacts () -- is invalid. Expecting a reference link of the form /entityset(key)."   } }     For this example; I was creating a new record and wanted to use the Account and its contact as lookup in my new record. The reterived Account did not have a contact and so my flow failed.   Solution :  Use the below if condition, if(empty(triggerOutputs()?['body/_primarycontactid_value']), ' ', concat('contacts(',triggerOutputs()?['body/_primarycontactid_value'],')'))   In this conditio...

Integrate LeadFeeder with Dynamics 365 CRM

Image
  Introduction :  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

Image
  Introduction : 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.    

Reopen Closed Appointment Using JavaScript in D365 CRM

  Introduction :   When an appointment is closed in D365 CRM, the appointment is not editable. There can be a requirment 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").setVal...

Nested IF Expression in Cloud Flow

Image
  Introduction :  We have been using Action-Condition for IF in Cloud flow, while this is easy to use, it ends up making your flow bigger in size. Instead if we just need to validate conditions,  we can use expression to do the same checks.   Solution: Add a compose action>> Go to Expression>> Add if()     Example: If(empty(field),'No Data', 'Data found')   Nested IF Example: If(empty(field),'No Data', if(equals(field,'xyz'),' XYZ Data', 'Data Found'))   Input: Account with Name XYZ is created. Action:   Output:  

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

Image
  Introduction: 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 

Parse JSON and update excel using Cloud flow

Image
  Introduction : If you have an Excel with data in JSON format and do not want to use Excel Power Query to transform JSON, you can use the below actions in Cloud flows.   Solution: Create a Manual trigger flow and upload the Excel with JSON data on SharePoint. Use List rows to read the excel data For every record in Excel, use the Parse JSON Action. After every parse, append the value to Output array with a comma. Use substring expression to remove the last comma of the appended value and store the new value.  Then use Update a row to update the Output to same Excel.

Change 'Lookup For' in Party list Using JavaScript

Image
  Introduction : Party list like "TO" usually contain record of type Accounts, Contacts, Knowledge Articles, Leads, Users   If you want to restrict the Lookup values, write the below script on load on the form and also on change of the partly list   var lookup = {     dropdown: function (execContext) {         var formContext = execContext.getFormContext();         if (formContext.getAttribute("dropdown").getValue() != null) {             dropdown = formContext.getAttribute("dropdown").getValue();             var LookUpFor = ['account'];             var fieldlist = ['to','cc','bcc'];  fieldlist.forEach(         function (item, index) {   ...

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

Image
  Introduction : We might have a requirement to send emails from Workflow/cloud flows to Ids that cannot be resolved as Contacts, Accounts, Users in CRM.   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. Loop on Multi Select Option Set Values Using Cloud flow Problem Statement: We wanted to run an action on all the selected values in a multi select option set(choice).  We get the data in a comma separated string.   Solution:  When we get the values in comma separated values, we will need to convert the string to an array format. Formula: array(split( Input comma separated data ),','))   Get the output ...

Set Dynamic Recipients of D365 Email in Power Automate

Image
  Introduction :  We can send email using D365 Connectors in Power Automate. To know about how to send emails, refer my blog: https://www.cloudfronts.com/send-d365-email-using-power-automate/   In this scenario where, the 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.       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, pass this array as input to the Activity Parties field in create an email record.  

Filter Regarding using JavaScript

Image
  Introduction :  In this blog we will learn how to filter regarding based on another option set field. Also, we shall understand how we can set the default view for regarding.   Solution : The below script will run on field change of "Type", this is the option set based on which the regarding will be filtered.         Regarding: function (execContext) {         var formContext = execContext.getFormContext();         if (formContext.getAttribute("type").getValue() != null) {             Type = formContext.getAttribute("type").getValue();               switch (Type) {                 case 1:             f...