Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate

Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate

Retrieving OptionSet Labels from CDS data in a Cloud Flow / Power Automate / Flow is an extra step than just picking from the Dynamic Values. Check this post!!

Scenario

While working with data that is either a result of a Dataverse Trigger (on Create/Update) or Action like (Get record, list record), the OptionSet fields from CDS/Dataverse return the Values of the OptionSet instead of the Text Labels –

  1. Let’s say this is the OptionSet in Dynamics
  2. And when you pick the OptionSet field from CDS either from an Action or a Trigger like this
    Let’s say I’m capturing this in a variable to show you

    I’m storing this in a variable for this example to show you

  3. I’ll capture the Value of the OptionSet i.e. the Value part

    Result –

  4. What needs to be displayed is the Label of the OptionSet! Let’s see how we can do this –
    1. Triggers
    2. Actions – List records (Inside Loops)
    3. Actions – Get record (Single record)

triggerOutputs() / triggerBody() to read the OptionSet values from Triggers

Let’s see how to read the OptionSet values from CDS Triggers, Create or Update –

  1. When a Flow is triggered using CDS/Dataverse Triggers (I’m using Common Data Service Environment(Current Environment) trigger), you can read the OptionSet value by using triggerOutputs() / triggerBody() function –
    Here’s a triggerBody() example

    Now, notice that the name of the field is cf_accounttype. So, the label in Triggers can be retrieved as _cf_accounttype_label and NOT cf_accounttype.

    Same way, you can also use triggerBody() function instead as well to yield the same result

    Here’s a post on triggerBody() / triggerOutputs() for your reference – Using triggerBody() / triggerOutput() to read CDS trigger metadata attributes in a Flow | Power Automate

items() to read the OptionSet values from Action Step – List Records (Multiple Records)

Let’s look at this example where you are retrieving multiple records using List Records and now, you apply a loop on each of those to read individual records.

  1. Assuming you are using List Records and you loop through the outputs of each of these records
  2. Now, the value is represented by items() function on the Loop that you are in i.e. Apply to each.
    Hence, the function is
    items('Apply_to_each')?['cf_accounttype@OData.Community.Display.V1.FormattedValue']


    This will show the label of the OptionSet in the results

outputs() to read the OptionSet values from Action Step – Get a record (Single Record)

Similar to items() function, we can use outputs() function to read from the Output’s of the Get a Record Action from Common Data Service (Current Environment)

  1. Get an Account is a ‘Get a record’ Action in CDS/Dataverse Current Environment connector. It’ll only fetch a single record.
  2. Now, let’s look at how outputs() function, similar to items() function used in case of Loops is used.
    Formula is –
    outputs('Get_an_Account')?['body/cf_accounttype@OData.Community.Display.V1.FormattedValue']

    In the above scenario, I’m reading under body hierarchy for cf_accounttype@OData.Community.Display.V1.FormattedValue

Hope this helps!

Here are some Power Automate / Cloud Flow posts you might find helpful –

  1. InvalidWorkflowTriggerName or InvalidWorkflowRunActionName error in saving Cloud Flows | Power Automate Quick Tip
  2. Create a Team, add Members in Microsoft Teams upon Project and Team Members creation in PSA / Project Operations | Power Automate
  3. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip
  4. Adaptive Cards for Outlook Actionable Messages using Power Automate | Power Platform
  5. ChildFlowUnsupportedForInvokerConnections error while using Child Flows [SOLVED] | Power Automate
  6. Run As context in CDS (Current Environment) Flow Trigger | Power Automate
  7. Using outputs() function and JSON Parse to read data from missing dynamic value in a Flow | Power Automate
  8. Setting Retry Policy for an HTTP request in a Flow | Power Automate
  9. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  10. Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate
  11. BPF Flow Step as a Trigger in CDS (Current Environment) connector | Power Automate
  12. Pause a Flow using Delay and Delay Until | Power Automate

Thank you!!

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.

InvalidWorkflowTriggerName or InvalidWorkflowRunActionName error in saving Cloud Flows | Power Automate Quick Tip

InvalidWorkflowTriggerName or InvalidWorkflowRunActionName error in saving Cloud Flows | Power Automate Quick Tip

If you are lately started creating Flows, you’ll come across some errors which are not precisely directing to what might be the issue but throw an error that says as below –

For Triggers (InvalidWorkflowTriggerName) –

Run Action (InvalidWorkflowRunActionName) –

Reasoning

The reason you see these errors are because of Invalid Characters which are in your Flow Trigger Step Names or on the Flow Action Step Names.

Invalid Characters in Trigger Names

Invalid Characters in Action Step Name.

Hence, the Step Names shouldn’t contain the below special characters –
< > % & ? /

Note: Trigger/Step Names can’t end with a Full Stop (.). However, if there’s a Full Stop in between, it’ll work

Hope this was helpful!

Here are some more Power Automate posts you might want to check out –

  1. Create a Team, add Members in Microsoft Teams upon Project and Team Members creation in PSA / Project Operations | Power Automate
  2. ChildFlowUnsupportedForInvokerConnections error while using Child Flows [SOLVED] | Power Automate
  3. Using outputs() function and JSON Parse to read data from missing dynamic value in a Flow | Power Automate
  4. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip
  5. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  6. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  7. Pause a Flow using Delay and Delay Until | Power Automate
  8. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate

Thank you!

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.

Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]

Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]

If you are new to creating a Canvas App and you’ve just added a Form and when you try to run and test the same in the browser itself, you don’t see it.

So let’s say you’ve put a form like this

And all you see is this –

So this happens based on the Default Mode and whether the context is passed to the form depending on the type or not.

Default Mode

There are 3 Default Modes for a form and it’s critical which one should be used when –

1. Edit – To be used if you are creating a new record. While using this mode, make sure the Item (from a data source is passed to the Form itself. Else, you’ll see the same error message as above and won’t see a blank form in that case.)
The Item property should be pointed to pick .Selected i.e. typically, <GalleryName>.Selected.

Context of a record i.e. a Row should be passed on to this form for Edit mode i.e. an existing row to be passed on to this Form from the preceding Gallery/Table control (or any data source based on your implementation). For example – The context I send to the form looks like this.
The last parameter i.e. <GalleryName>.Selected is placed on the select button so that once clicked, it’ll send the record context over to the form so that the form is displaying the selected record (which is picked from Item property in the above screenshot)

2. New – New should be used if the Form you’ve inserted isn’t coming as a result of populating a selected record. But you will enter new values and Submit it the first time.
Once New is selected, the form will correctly render for you when you test or run the App once correct Mode is selected (i.e. you don’t intend to pass any context to the Form)

3. View – In this view, fields will not be visible and instead the data will be a result of the selected item from the List/Gallery view it is coming from i.e. a Data Row which will populate this form. This will be a Read-Only view.
Another form example where View is selected, fields won’t show up but this form would need Context to be passed to it just like in the New mode.

Hope this quick tip was useful.

Here are some more Dynamics 365 related posts you might want to check

  1. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox
  2. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  3. Track and Set Regarding are disabled for Appointments in Dynamics 365 App For Outlook message | Demystified
  4. Cancelled Bookings Imported in Time Entries in Dynamics 365 PSA issue | [Quick Tip]
  5. Remove ‘This Email has been blocked due to potentially harmful content.’ message in Dynamics 365 Emails | OrgDbSettings utility
  6. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  7. Get Dynamics 365 field metadata in a Canvas App using DataSourceInfo function | Common Data Service
  8. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]

Thank you!!

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.

Announcing two new Microsoft Dynamics 365 Fundamentals certifications!

Announcing two new Microsoft Dynamics 365 Fundamentals certifications!

This article is contributed. See the original author and article here.

People in many different roles and at various stages in their careers can all benefit from the two new fundamentals certifications being added to the Microsoft training and certification portfolio: Microsoft Certified: Dynamics 365 Fundamentals Customer Engagement Apps (CRM) and Microsoft Certified: Dynamics 365 Fundamentals Finance and Operations Apps (ERP). With more and more businesses using Microsoft Dynamics 365, and a growing need for people skilled in using it to help take advantage of its potential, the opportunities for people who can demonstrate their skill with certification are also increasing. See if these two new certifications can help you advance your career.

Microsoft Certified: Dynamics 365 Fundamentals Customer Engagement Apps (CRM)

The training for this certification gives you a broad understanding of the customer engagement capabilities of Dynamics 365. It covers the specific capabilities, apps, components, and life cycles of Dynamics 365 Marketing, Sales, Customer Service, Field Service, and Project Operations, and also the features they share, such as common customer engagement features, reporting capabilities, and integration options. Exam MB-910: Dynamics 365 Fundamentals: Customer Engagement apps (CRM), which you must pass to earn this certification, measures skills in these areas. There are no prerequisites for this certification.

Is this certification right for you?

If you want to gain broad exposure to the customer engagement capabilities of Dynamics 365, and you’re familiar with business operations and IT savvy—with either general knowledge or work experience in information technology (IT) and customer relationship management (CRM)—this certification is for you.  Acquiring these skills and getting certified to validate them can help you advance, no matter where you are in your career or what your role is. Here are just a few examples of who can benefit from this certification:

  • IT professionals who want to show a general understanding of the applications they work with
  • Business stakeholders or people who use Dynamics 365 and want to validate their skills and experience.
  • Developers who want to highlight their understanding of business operations and CRM.
  • Student, recent graduates, or people changing careers who want to leverage Dynamics 365 customer engagement capabilities to move to the next level.

Microsoft Certified: Dynamics 365 Fundamentals Finance and Operations Apps (ERP)

The training for this certification covers the capabilities, strategies, and components of these finance and operations areas: Supply Chain Management, Finance, Commerce, Human Resources, Project Operations, and Business Central, along with their shared features, such as reporting capabilities and integration options. Exam-MB-920: Dynamics 365 Fundamentals: Finance and Operations apps (ERP), which you must pass to earn this certification, measures skills in these areas. There are no prerequisites for this certification.

Is this certification for you?

If you’re looking for broad exposure to the enterprise resource planning (ERP) capabilities of Dynamics 365 and a better understanding of how finance and operations apps fit within the Microsoft ecosystem—and how to put them to work in an organization—this certification is for you. People who are familiar with business operations, have a fundamental understanding of financial principles, and are IT savvy—with either general knowledge or work experience in IT and the basics of ERP—are good candidates for this certification.

By earning this fundamentals certification, you will gain the skills to solve ERP problems and you can validate those skills to current or potential employers, helping to open career doors. If one of the following groups describes you, earning this certification can benefit you.

  • IT professionals who want to highlight their broad understanding of the applications they work with
  • Technical professionals and business decision makers who are exploring how Dynamics 365 functionality can integrate with apps they’re using.
  • Business stakeholders and others who use Dynamics 365 and want to learn more.
  • Developers who want to show a deeper understanding of business operations, finance, and ERP.
  • Students, recent graduates, and people changing careers who want to leverage Dynamics 365 finance and operations apps to move to the next level.

 Exam MB-901 is being retired

The two exams associated with these new certifications, Exam MB-910 and MB-920, are replacing Exam MB-901: Microsoft Dynamics Fundamentals. Exam MB-901 will expire on June 30, 2021. After that date, it will no longer be available for you to take – only MB-910 and MB-920 will be – so if you’re currently preparing for MB-901, make sure you take and pass that exam before June 30, 2021.

Explore these two new fundamentals certifications and other Dynamics 365 and Microsoft Power Platform fundamentals certifications. While you’re looking for ways to build and validate skills to stay current and enhance your career, why not browse the 16 Dynamics 365 and Microsoft Power Platform role-based certifications too? Find a training and certification that’s a perfect match for where you are now.

Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform

Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform

Although, you can use Text based controls to represent data as is in a Canvas Power App. So why not go an extra mile to make it look more intuitive.

Scenario

Let’s say there are Accounts and you have some kind of Compliance Ratings on them to represent compliant they are based on certain criteria. Could be a Numeric value or Decimal value. But Rating Control represents only in Numeric i.e. Whole Numbers.

So, for this example, I’m using a Rating field which is of type Whole Number in Dynamics 365 on Account entity.

And the complete Dataset looks like this in Dynamics 365 / Dataverse.

Note: I tried with Decimal but it rounded the values hence, sticking to Whole Number.

Rating Control

  1. Let’s say below is the Gallery and you want to show Ratings in the form of stars instead of traditional numeric values.
  2. Now, let’s use Rating Control below the Names of the Accounts to show the Rating values. Select the first Row once you connect to the Common Data Service i.e. CDS / Dataverse Data Source and select the entity you want to populate it with. In this example, we are using Accounts. So my Gallery is populated with Accounts records.
    Select the first record and navigate to Insert tab and look for Input controls as shown below

    Now, look for Rating control.

  3. Once you select Rating, it’ll appear iteratively since it’ll be applied “For Each” of these records in your Gallery control.
  4. I’ve just rearranged them under the name to make them look proper.
  5. Let’s make it Read Only by changing the behavior, so that the Users don’t accidently touch and set a value during Runtime. Although, this won’t affect the actual data but the representation will be incorrect in that case.
  6. Also, the Max will represent the length of your Rating whereas the Default value are kept to 0 in case the field value is not set at Source. (I think 1 would still be misrepresenting)
  7. Now, I’ll connect this Control to the Data Source’s field i.e. Rating field on the Account entity that represents the Rating value.
    On the Default, I’m setting ThisItem.Rating where ThisItem represents the Row of the Account i.e. the Account record itself and Rating is the field in Dynamics 365’s Account entity which we saw in the scenario above.
  8. And that’s it. You can Save and Publish your App and Run it.

Rating values

Now that we’ve added the Rating Control, let’s Run our App and see how it represents the data from your Accounts entity.

And the Ratings represent the below data –

Hope this was useful!

Here are some more Canvas Power Apps posts you might want to check –

  1. Clear a field value & Reset Form in a Canvas Power App [Quick Tip]
  2. Get Dynamics 365 field metadata in a Canvas App using DataSourceInfo function | Common Data Service
  3. Debug Published Canvas Power App with other users using Monitor | Power Platform
  4. Download a File from a Canvas Power App using a button | Power Platform
  5. AddColumns() function to dynamically add columns to a Data table in Canvas Power App | SharePoint List
  6. Implement real-time search in Gallery of CDS records in a Canvas Power App | Power Platform
  7. Implement character length validation in a Canvas Power App | Power Platform
  8. Log Canvas Power App telemetry data in Azure Application Insights | Power Apps
  9. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate
  10. Send a Power App Push Notification using Flow to open a record in Canvas App | Power Automate
  11. Dependent OptionSets in a Canvas Power App for 1:N related CDS entities | Power Platform
  12. Restore older version of a Canvas Power App | Power Platform

Thank you!!

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.