How to assign power automate per flow plan to your flow

Since Microsoft came out with their new licensing around the Power platform breaking the power apps licenses and power automate licenses apart there has been a lot of questions in the community forums and generally on how are power automates getting licensed. Short answer to that question is there are now two licensing options available if someone would like to enjoy the power of power automate and power automate is not included in the license options for power apps.

  1. Power automate per user plan
  2. Power automate per Flow plan

 

The per user plan is quite self explanatory and the license is assigned to the user like the previous power apps plan 1 and plan 2 licenses, this has a lower limit than the expensive per flow plan but does allow that particular user to create unlimited number of flows for themselves. The power automate per Flow plan has a different process of assignment to the Flow. In order to assign the per flow plan to your flow. First you have to procure the license which comes in a bundle of 5( yes you have to buy minimum 5 flows costing $500/ month) and then you can buy an additional each for $100. Once the licenses are visible in your tenant. You will start to see the below Add on option in your Admin power platform portal under capacity.

 

Under Add-ons you will see all the flow licenses you purchased and will get the option to assign to one of your CDS environments

Select the environment you will be running your flows in, assign the number of flows and click on Save. Once done goto your flow in that environment and click on edit. The Per-flow option that is disable by default will become available.

With flow capacity assigned:

 

For more info on flow licensing. please visit https://docs.microsoft.com/en-us/power-platform/admin/powerapps-flow-licensing-faq

I also recommend you take the time and read the latest (As of July 2020) licensing guide, https://go.microsoft.com/fwlink/?linkid=2085130

 

 

 

Merging D365 Power Platform Solution Patches into a Major Version Update

If you would like to understand what are solutions and how to use them please visit my previous two posts where I talk about How to create a solution and how to create a solution patch. In this post we will see how we can merge the patches we created and create a Major version update of the solution for release.

 

To start off we will create another patch on top of the existing 9.1.0.0 base solution and the patch 9.1.1.0

To create another patch, select the base solution and click on Clone a Patch

This will create the second patch and versioning will stay in order

To create a major release we will follow what is called the cloning process. The good thing about following the patch approach and sticking to the recommended versioning is that our cloning will merge all patches together along with the base solution when we create a major version. In order to do so we will select the base solution, in this case 9.1.0.0 and click on Clone Solution

As we can this time the process recommends the next major version which is 9.2.0.0 instead of 9.1.3.0. When we click save the base solution and all patches will be merged automatically and we will end up with a single solution versioned as 9.2.0.0 this will be the solution we export in order to do a version upgrade at the managed box end (more on that in later posts)

 

To read more on patches please visit, https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/use-segmented-solutions-patches-simplify-updates

 

Testing the Payable Skype Chat Bot to create and find a Purchase order in D365 #Dyn365FO

A chat bot recently developed by my colleagues Amir Nazim and Zain Khan at Mazik Global got me excited for how much room there is for enhancing the AX user experience and simplifying day to day tasks of an ERP end user. This chat bot right now enables you to find an existing purchase order in AX within a few seconds and also has the option of letting you create a purchase order in AX by answering a few questions of the bot. So if you are an end user that’s on the go or is finding it too cumbersome to open AX just to see details of a purchase order  you can simply hit up this bot and get it to do the work for you.  See the video below in which I talk to this bot to perform these tasks for me without having to say please. This showcases the true power of Odata entities and the bot framework.


For information on how to create a similar bot visit:

  1. Payable Bot Dynamics ax 365

  2. Purchase Order Chat-bot application with OData endpoints using WebApi in D365 for Operations

 

How to read data from a production instance in D365 #Dyn365FO

Recently I was trying to find the best way to read only updated/changed data from AX for some entities like customers and vendors in D365. To do this in AX 2012 we would generally get a read only database copy made of  production, enable modifiedDateTime fields and query the recently changed data from that database for our reporting needs but in D365 a cool new feature has been provided called change tracking. Through this you can get AX to push changes to your records to an external database outside of AX. A brief overview of this is that we use data entities to list what we need pushed out and configure them to export to our database. Read more on this here: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/entity-change-track

In Data management:

Register read only DB outside AX, providing its connection string:

 

Change tracking options:

Error on MPOS sync jobs #Dyn365FO

Errors:

Failed try of uploading data package to blob storage, error message: System.Reflection.TargetInvocationException has been thrwon

connection could be made because the target machine actively refused it

The change tracking information related to scheduler job 1090 and channel database group Default are only partially available, due to the headquarters data base change tracking retention period settling.

 

Solution:

Make sure your azure emulator is running.

How to check which IIS your AX Finance and Operations web App is hosted on in D365 #Dyn365FO

This can be done by going through the web.config xml file which is located at  “X:\AOSService\webroot”. Several parameters are configured here for for the application and i’ll go through some below, as a developer or administrator of Dynamics AX it is essential to know what configs are set here, so do give it a read and go through each element.

Hosting configs:

<add key=”Infrastructure.HostName” value=”usnconeboxax1aos.cloud.onebox.dynamics.com” />
<add key=”Infrastructure.HostUrl” value=”https://usnconeboxax1aos.cloud.onebox.dynamics.com/&#8221; />
<add key=”Infrastructure.SoapServicesUrl” value=”https://usnconeboxax1aos.cloud.onebox.dynamics.com/&#8221; />
<add key=”Infrastructure.InstanceEndpointIPAddress” value=”localhost” />
<add key=”Infrastructure.MaxInstanceEndpoint” value=”10010″ />
<add key=”Infrastructure.MinInstanceEndpoint” value=”10000″ />
<add key=”Infrastructure.PersistentVirtualMachineIPAddress” value=”localhost” />

Package directory folder settings:

<add key=”Aos.AppRoot” value=”C:\AOSService\webroot” />
<add key=”Aos.PackageDirectory” value=”C:\AOSService\PackagesLocalDirectory” />

Database info in the file:

<add key=”DataAccess.Database” value=”AxDB” />
<add key=”DataAccess.DbServer” value=”localhost” />
<add key=”DataAccess.SqlPwd” value=”XXX” />
<add key=”DataAccess.SqlUser” value=”axdbadmin” />

 

Creating a Data entity to export records for a Date effective Table in Dynamics 365 #Dyn365FO

When creating a data entity for a data effective table there are a few properties we need to consider for our imports and exports to work correctly. There can be two scenarios.

1. Data entity is not date effective but one or more data sources within the entity are date effective.

For example we have to export details of a Party record. Now the Party record is saved under DirPartyTable that is not date effective but its First, Middle and Last names are stored in DirPersonName table that is date effective. In order to make sure that we get the latest names of this party while exporting data we need to configure the entity to do so, else it will send whatever record is first in DirPersonName against the party record. To configure it we simply need to set the Apply Date Filter Property to Yes for DirPersonName and make sure we add the ValidTo and ValidFrom fields of DirPersonName datasource to the entity field list.

Parent data source DirPartyTable, not DateEffective:

 

Child data source DirPersonName, that is date effective:

2. Data entity is date effective

What this means is that our data entity has at least one date effective data source and itself implements the date effective framework. Keeps track of latest and old records rather than overriding existing records on update. Will discuss this further in my next blog.

For more information about date effectivity in data entities see: Date effectivity

D365 Mystery Hosting Explained #Dyn365FO

Mystery: IIS was stopped but D365 app was still running. How could this be? Its a single box Azure VM and everything, not just the AOSService but ISS itself is off. I verified the app is connecting to the right database and verified the webconfig file points to my own server so some other machine could not be hosting the App, I checked all configurations and none point to a different server so what magic is going on here.

 

I’m sure this would not be a mystery for everyone but for a short time it became a mystery to me and might become to some others as well so I had to get to the bottom of the magic happening. After some research I got to know that after the recent platform update 12 D365 is hosted on IIS Express, and as you know IIS express runs on visual studio, so if you have Visual studio open your app will be hosted. I ran a few scenarios after this so here is a list of them.

 

  1. If Visual Studio is open, your IIS is stopped, D365 would still run on based on IIS Express.
  2. If Visual Studio is closed, your IIS is stopped, D365 url will give you a Service Unavailable error
  3. If Visual Studio is closed, IIS is running, D365 will run based of your AOSService site.
  4. If Visual Studio is Open, IIS is running, D365 will run.

Thanks to a post by Faisal here which lead me to this. It explains what else was done wrt to update 12 like elimination of Admin user on lcs and availability of a Developer user.

 

Mystery Solved!

 

Address and contact information table relationships to a party in #AX2012 & #Dyn365FO

Both address and contact information on a customer, vendor or any party record is stored at the party level. So while the parties Customer and Vendor are company specific the party record is cross company. If you create a customer against the same party in two companies and modify the address of Customer A in company X you will see the changes for Customer B in company Y. This is because when we are modifying a customers address or contact, it is actually modifying the party address and contact. You can test this out without getting into the development environment by creating a customer in one company with an address and contact, note down its party number that was created, then create a customer in another company and use the change party association option to assign the newly created customer the party number of the previously created customer. After this, change the address on any one of the customers and you will see the changes reflect on the other company customer as well. Now generally this is not the case as when you create a customer in a company a new party record gets created against it and within AX you always create a customer or vendor first and not a party itself.

Coming down to the technical’s in play for this. A party record is stored in the DirPartyTable and in order to query its locations(addresses/contact information) you can query the DirPartyLocation table which will give out  records that each represent an address and one record that represents all contact information records, to identify these there are NoYes enum fields such as IsPostalAddress. For example if there are 3 addresses on a customer and 5 contact information records, this table will show you 4 records. Each record contains a Location field that represents the RecId of  the LogicticsLocation table, this table contains links to the address and contact information records. Addresses are saved in LogisticsPostalAddress table and contact information is stored in LogisticsElectronicAddress table, each table has as relationship with the LogisticsLocation table as shown below.

Contains 4 records, 3 for addresses and one for contacts:

These records can be used to query the address in LogisticsPostalAddress table below, wrt to the following relationship:

Hopefully this gives you an idea of the crud operations of an address and contact information in AX. This applies to both AX 2012 and D365.

Track Platform and application updates for #Dyn365FO

A good resource to bookmark for any Dynamics 365 finance and operations professional is the Software lifecycle policy and list of releases page to track and get brief updates about platform and application releases with links to their detailed changes. This is updated regularly, last update was made yesterday 25th March 2018 about platform 15 which has a cool new addition of the ability to color grid rows without over laying as well as the application update 7.3.11971.62687

Ref: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/migration-upgrade/versions-update-policy