Skip to main content

Posts

Showing posts with the label Microsoft Dynamics 365

Power Automate Flow and Environmental Variables

  Power Automate Flow and Environmental Variables On my last blog I have shown you how to create an Environmental Variable in Dynamics 365 Solution. Now for the second part we are going to focus on how to consume or use the environmental variable in a Power Automate Flow. As you can see in the following image the environment variable will be accessible through the dynamic content, bare in mind you will be able to see the appropriate Environmental variable based the field data type you have selected. In this example we are creating a Task with Subject and Description populated by the Environmental Variables I hope this was helpful on how to use Environmental Variable inside a Power Automate flow, you can addopt this to your specific use case.

XMLHttpRequest vs Xrm.WebApi

  XMLHttpRequest vs Xrm.WebApi If you have written JavaScript code for Dynamics 365 you have seen the use of XMLHttpRequest or Xrm.WebApi to make server-side calls. The question is which one is the right one to use? So, let’s analyze the two types of calls. XMLHtttpRequest 1.        Synchronous a.        Sample Code var req = new XMLHttpRequest(); req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/accounts", false ); 2.        Asynchronous a.        Sample Code var req = new XMLHttpRequest(); req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/accounts", true ); So, passing true parameter is going to make asynchronous call while passing it false is going to make a Synchronous call. Xrm.WebApi 1.        Asynchronous a.        There is...

Power Automate Flow How to Create Email Message with a Table of list of record.

  Power Automate Flow How to Create Email Message with a Table of list of record.   If you are working on a scenario where you must include a list of records in an email, then I would say keep on reading. Let’s pick a simple scenario, when and account is assigned to a user lets send the list of Contacts associated to the account to the new Owner.   Our next step is going to be , to retrieve all associated Contacts to the account, we are going to use the List records action from the Common Data Service, I prefer to use the Filter Query if you are not comfortable with rest calls just go ahead and use the Fetch Xml Query you can use advance find to build the appropriate Fetch Query   Here there are two options you can take:   Call Create HTML Table and build your table Build a list then pass the list to Create Html Table I personally prefer the second approach, its cleaner, it will give you the ability to select which fields you want to in...

Create Power Automate Flow that triggers on Demand, Dynamics 365

  Create Power Automate Flow that triggers on Demand Let start by finding When a record is Selected     Note :- This component belongs to the old Common Data Service, I have noticed you can use it with the new Common Data Service, which is good in my book.   For our example here we are going to select Accounts as our Entity, you can enter your environment under Environment, it will take the URL of the environment you are targeting. If you have any parameters to pass to the Flow you can select any of the following Inputs         Text         Yes/No         File         Email         Number         Date Text 1.        Add drop-down list options :- will give you the ability to add dropdown values 2.        Add a multi-select list option :- as it name explai...

How to use Formatted Values in Power Automate Flow Dynamics 365

  How to use Formatted Values in Power Automate Flow Dynamics 365   If you have been working on Power Automate for Dynamics 365 you might have been wandering how you can access a lookup Formatted Value or Option Set formatted values. You can use the following format to access: body(‘{Action Name}’)?[‘{fieldname} @OData.Community.Display.V1. FormattedValue’] You just have to be mindful in Dynamics 365 lookup field name they do not translate to the proper field name, you might have to and an “_” as a prefix and “_value” as a postfix, I will leave that to you.

How to call a Dynamics 365 Action with Input parameters from Logic App or Microsoft Flow

How to call a Dynamics 365 Action with Input parameters from Logic App or Microsoft Flow On my previous post How to call Dynamics 365 Action from Logic App. I have described how to call an Action from a Logic App or Microsoft Flow. So you can refer that post to set up your configuration. This post is going to be about calling an Action that has Input parameters from Logic App or Microsoft Flow. We are going to use the Http Request. As a Sample Action we are going to create a global Action with 2 Input parameters , S tring EntityReference After we have set up our Http Request with the proper Authentication we will call the Sample Action as follows Parameters Inputs are passed under the body, for any EntityReference the following entries are expected : type → “Microsoft.Dynamics.CRM.{{entity name}} id → Guid as string Happy Coding :)

How to call Dynamics 365 Action from Logic App.

How to call Dynamics 365 Action from Logic App. You might have stumbled in a scenario where you have an Action in Dynamics 365 and you want to trigger it from a Logic App. As you know the Dynamic 365 Connector has good features, but it does not have the ability to call an Action at least as far as I know. You can solve this by leveraging the HTTP call in logic App, to have a better understanding you can read on the following article https://docs.microsoft.com/en-us/azure/connectors/connectors-native-http . So the idea is to create a Rest API call that triggers the Dynamics 365 Action. Prerequisite: Generate your REST API call You can use CRM REST Builder In general though this is the generic path to call an action {{clientUrl}}/api/data/v9.1/{{Entity Name}}({{Record Guid}})/Microsoft.Dynamics.CRM.{{Unique Name of Action}} Get the following information for Active Directory OAuth authentication Tenant ID Audience which is the ...