In one of the projects I am working a the moment, we do use an custom activity on the case entity. Last week I had the requirement to create an automated name for this entity. Which is a quite common requirement. In this case the name should be composed out of customer name, Case subject and the current date and time.
I thought it would be a perfect useCase for a Power Automate flow.
While creating the flow I actually had some problems getting the customer from the “Customer-Field” of the case entity. The “Customer-Field” always is a bit tricky, since it could contain an contact or an account. I talked about it with Sara Lagerquist (she is my flow questions, go-to person 😉 ). After a bit of discussion, she came up with the solution. Thanks for that!
I created a trigger “onCreate” of our custom “Demo” entity. The first step was to load the related case entity and filter it on “title” and “customerid”.
Unfortunately, this resulted in an error that Power Automate is unable to find the property “customerid”.
The whole error message:
"message": "Could not find a property named 'customerid' on type 'Microsoft.Dynamics.CRM.incident'.",
There is actually a very simple solution. It is to filter on “_customerid_value”.
After that, it is possible to add a split based on the entity type in the “Customer-Field” do either load an contact or an account.
Important to mention is, that you have to create the split before you actually filter the case. Only then it is possible to choose the “Customer (Type)” as a condition.
After filtering the “Get Record” the condition will be changed to a not very user-friendly expression. But it is still working. Until now I was not able to recreate the condition manually.
And here is the complete flow to set the correct name.
I would like to point out the step that generates the time. It is a “convert time zone” action, which converts the time from UTC to UTC+1. The reason for that is that I am located in Stockholm and the servers are located in Ireland (as far as I know). You could also generate it with an expression in an compose action. But in this case it will not convert the time zone like i need it.
This is just 1 of 42 articles. You can browse through all of them by going to the main page. Another possibility is to view the categories page to find more related content. You can also subscribe and get new blog posts emailed to you directly.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.