Posts

How to Set Lookup Fields with Null Value from Dynamic Content in CDS (current environment) Connector

Image
In one of my previous blog posts, I wrote about How to Set Lookup Field Value in Common Data Service (current environment) Flow Connector. In that blog post, I mentioned that I was not sure how to set a lookup as null either directly or from another record’s lookup field as the output of the step (which can potentially be null). Recently, I discovered a way to do that and I would like to share that with you all in this post.


Problem statement What is a Nullable value in this situation? Nullable value is any field that is blank or has no value. The field could be empty/null because the field was not mandatory and/or the user may not have entered any value for it when filling up the form. When a nullable filled is used in flows to get data from, we need to consider the scenarios where the field value is empty, how to check if it’s null from a previous step (trigger, Get a record, List records) before using that field in the subsequent step of the flow.
What is that problem with…

Get the Lookup Display Name and Option Set Value Label in a Single Query Using a CDS (Current Environment) Connector FormattedValue Property

Image
One of the limitations in using Common Data Service (current environment) connecter in Power Automate (which might probably be renamed as Dataflex Pro connector in future 😜) comparing to the classic workflow WAS the inability to get the display name of the lookup value or the label of the option set value in one simple query. However, this is actually not the limitation of the platform itself. It seems that the CDS (current environment) actions did not use the odata.include-annotations preference with the value of OData.Community.Display.V1.FormattedValue which is required by the Web API to include formatted values in the response. If we query data using the Web API with OData.Community.Display.V1.FormattedValue, the system returns the record with properties that support formatted values. Even the standard CDS connector can return at least the label of the option set value with "_*optionsetfield*_label" property.
Getting the formatted value is a functionality…

Minimum Privileges Required to Log in to Model-driven Apps in Dynamics 365/CDS

Image
One of the security best practices in Dynamics 365 is to use the base security role as a baseline and apply that role to all Users. The base security role will include all the common/basic permissions that are required to have access to the system (you can read more details in  Tip #2 of Power Platform / Dynamics CRM  Tip of the Day). The advantage of using the base security role is to allow the administrator to add/remove privilege for all users by just updating the base security role instead of having to go through all the security roles. The base security role is different for each project depending on what the user with the minimum permission should be able to perform in the system.
To set up the base security role for the first time create a new empty security role.add the minimum privileges required to access the system.add the privileges required for the basic functionalities.test the role with the test user account. add the permissions to the entities…

Script Errors Encountered after Field Service Upgrade to 8.x

Image
In one of my projects, I suddenly encountered script errors after upgrading the Field Service solution from version 7.x to 8.x (the latest version). When loading the Quote and Product line item forms, the system shows the following error message:
Script Error

One of the scripts for this record has caused an error. For more details, download the log file.
Web resource method does not exist: FS.Quote.Library.Load
Upon further investigation, I found that the Display Name of the Quote Library is empty in the Form Properties.

And when I clicked Edit on the Quote.Library.js, the content here is empty too. This is what caused the error message popping up every time the form is loaded. 
Solution: As suggested by Microsoft Support engineer, the solution is to remove the deprecated/empty library (e.g. msdyn_/Quote/Quote.Library.js) add the library found in the Field Service Information Form (i.e. msdyn_/Quote/FieldService.Qu…

Access Flow Run History within a Record in Dynamics 365/CDS

Image
As recommended by Microsoft, I have been creating automated flows instead of background workflows for a while now (obedient me!). But not being able to see the list of Background Processes related to the record is one of the things that I miss from the classic background workflows (especially when I am having an issue 🐛 with a particular record).
Although we no longer have the Background Processes associated view in Unified Interface anyway, I still wish I could still see the list of flow run history related to a particular record in a similar fashion as background process history. In that way, if there is an issue with a particular record, I can quickly go and check out the related flow runs instead of listing all runs in Run History, downloading the .csv file, 🤿 diving through all rows and looking for the record GUID to find that URL of a particular run (phew! 😅).
Note: If you want to see approval flows associated with a CDS entity record, you can use this awesome Appro…