Language format for Whole Number field in Dynamics 365 CE

If you create a Whole Number field in Dynamics 365 CE environment, you’ll notice a Format which is available for you to choose i.e. Language among other formats like None, Duration, Time Zone.

Let’s see what the field is and what it stores.

Language

  1. Let’s say you are creating a field on the Contact i.e. Preferred Language.


  2. And, it is represented in the below way – like a Drop Down



  3. Now, if you wonder which all Languages are displayed? Well, the ones which are Enabled for the D365 Organization are displayed in the Drop-down. They simply are set as data and doesn’t affect the record apart from the data value itself.

    So, if you go to the Settings > Languages


    Any other language apart from the Base Language of the Organization which is enabled is considered.


    You’ll find all the Microsoft Locale IDs here: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912047(v=winembedded.10)?WT.mc_id=DX-MVP-5003911

Data

Now, let’s see what the field stores.

  1. I’ve written a short JS to pick what the field has stored as data. When I debugged, here’s what the field holds.
    It stored


  2. Also, if you try to set data which is not enabled i.e. tried to set Language which is not enabled for your Dynamics 365, you’ll see the below validation error which says that the value is out of the allowed range.

Hope this post was useful!

Here are some more posts for Dynamics 365 Customer Engagement / CRM you might find useful!

  1. Custom Help Pages and Guided Tasks for Unified Interface in Dynamics 365
  2. Make Managed fields Required in Dynamics 365 – Managed Properties Error [Workaround] | D365 CE Quick Tip
  3. Sign up for a Dynamics 365 Project Operations (Lite Deployment) environment and provision a new instance | Power Platform
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Duration field in Dynamics 365 converts Hours value to Days in Dynamics 365 | [Flow Workaround to convert in Hours and Mins]
  6. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  7. Form Access Checker in new Power Apps Form Designer | Model-Driven Apps in Dynamics 365
  8. Connecting XrmToolBox to an MFA enabled Dynamics 365 environment | Azure AD
  9. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  10. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox

Thank you!!

Transition effect on Gallery Items when hovered over in a Canvas Power App | [Quick Tip]

While using a Canvas App on Desktop, or when it’s embedded in Dynamics 365 CE, it’s a nice design decision to highlight the Gallery items on which your mouse is pointing on as you navigate/scroll.

Default Behavior

By Default, the Gallery Items remain visually static and don’t show any effect if you move your mouse over the items.


That’s because the Transition effect on the Gallery items is set to None by default.

Transition Effects on Gallery Items [Pop & Push]

As you’ve seen the Default behavior, let’s also look at the 2 effects that are available to us

Pop

  1. Select the Gallery and then on the right-hand side, look for Transition field, it’ll be set to None by default. Change it to Pop.


    Now, in Pop, the effect will be as below –


Push

Similarly, like Pop, Push will have the reverse effeect of pressing into the item hovered.

  1. Again, when Gallery is selected, set the Transition to Push in the menu, save the changes and check again.


    The Push effect will be as follows –

Here’s a quick YouTube video for the same –

Hope this was useful!

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

  1. Navigate Screen automatically based on Timer in Canvas Power App | Power Platform
  2. Search on multiple columns from a Dataverse table in a Canvas Power App Gallery control | Power Platform
  3. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  4. Call a Flow from Canvas Power App and get back response | Power Platform
  5. Enable Custom Code Components (PCF Controls) to be imported in a Canvas Power App | Quick Tip
  6. Retrieve Hashtags from Text in a Canvas Power App | Power Platform
  7. Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform
  8. Implement character length validation in a Canvas Power App | Power Platform
  9. AddColumns() function to dynamically add columns to a Data table in Canvas Power App | SharePoint List
  10. Aggregate functions in a Canvas Power App | Using on SharePoint Lists

Thank you!

Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate

As Dataverse connector keeps getting updated from time to time, here’s a new Search rows (preview) Action which you must be seeing in the Dataverse connector in Power Automate. Let’s see how we can use this Action.

As it suggests, that this is still in preview! So kindly take a note of that.

Search Rows (Preview)

  1. Search rows is an Action in the Dataverse connector and you’ll be able to see it like this

Enable Relevance Search

  1. Let’s assume you went ahead and used this connector in your Flow without having Relevance Search enabled in your D365 CE organization, you’ll see the Search Rows throw the below error.


    And the error is described as –

  2. To make Search Rows work, Relevance Search must be enabled for you Dynamics 365 CE / CRM environment. Head over to the System Settings in Dynamics 365 under Settings > Administration > System Settings. And in General tab, look for Relevance Search option, check-mark it and save.


  3. Here’s the full Microsoft Documentation on how to use queries for Relevance Search – https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/relevance-search?WT.mc_id=DX-MVP-5003911

Using Search Rows action

Let’s see how this Action from the Dataverse connector will work –

  1. Now, once you have selected the Search rows action, below are the features which I’ll explain one by one –

  2. Let’s first look at the last item i.e. Return row count. As it says, will result the count of results returned if set to Yes.
    Will return -1 if set to No.

  3. For Search Type and Search Mode to be covered, these need to be explained extensively since it covers several factors. To keep it short for now, I’ve linked the Search Type and Search Mode documentation as below
    https://docs.microsoft.com/en-us/power-automate/dataverse/search#search-type?WT.mc_id=DX-MVP-5003911

    And the short Summary of the same is:
    Search Type:simple | full” There are 2 types called as simple and full. Default = simple. Both have different functions within them that you can use on the Search Term.

    Search Mode: “any | all” By Default – any. This defines if any criteria of the Search Term is to be considered or all must be true based on different syntax and operators used.
  4. Row Count denotes how many records should the results Return which is standard across other Dataverse actionss.
  5. Also, Row Filter uses OData style filtering which we’ll omit in this example to keep it simple. 😊
  6. Now, let’s enter a Search Term and keep it simple, I’ll pick an example: “Contoso“.
    Next, look at the Table filter – If I leave it blank it’ll search for Contoso across all Tables in Dataverse.


    Result to show from all Tables as per the above Search rows term –


    Now, I’ll add account and contact (I do have some records in the Opportunity as well which has the keyword ‘Contoso’. So those will be filtered out)


    And the result will be as follows –


    And if we look at the Raw Outputs to see how data is retrieved, we get the below –

  7. Now, let’s look at Sorting.
    Now, in the Sort by filter, I’ll enter the field name ‘name‘ and desc as the order of the Sort.
    And then, we’ll check the results


    And the results were as below –


  8. Next, let’s look at Facet Query. basically, it drills down on the Results which are already returned as a part of the main query and serve as metadata for the same to gather similar information together.
    Here’s how I enter a Facet query – Ex: contact.address1_city. Meaning, it’ll return Address 1: City from all the returned Data and store it under Facet Query.


    Now, when we run this, we’ll get the following results –


  9. Let’s look at what Skip Rows does.
    It’ll only omit the records from the already returned Results. Example: Even if the Result returned 5 records, it’ll Omit/Skip first x records. But still show that the Results returned are whatever the Query is supposed to return.

    In the below example, out of 5, I’ll skip 4 rows.



    And when you run the Query, you’ll find that the Record Count is 5, but only 1 entry was available in the Output.



Which Columns are Searchable?

There are 2 points to keep in mind to know and configure which all columns will the Search be performed on.

  1. If you are aware of how you can configure the Quick Find views in Dynamics 365 CE, same is applicable here since this works off of Relevance Search itself.
    In any Table/Entity’s Quick Find view, make sure the columns are selected in the Add Find Columns

  2. The ones selected in Find Columns are the ones on which the Search will be performed.

Here’s a YouTube video I made to demonstrate the same –

Hope this was useful!

Here are some more Power Automate / Cloud Flow posts you might want to check –

  1. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  2. Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate
  3. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  4. Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
  5. Asynchronous HTTP Response from a Flow | Power Automate
  6. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  7. Tag a User in a Microsoft Teams post made using Power Automate
  8. Converting JSON to XML and XML to JSON in a Flow | Power Automate
  9. Formatting Approvals’ Details in Cloud Flows | Power Automate
  10. Office 365 Outlook connector in Cloud Flows showing Invalid Connection error | Power Automate
  11. Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
  12. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip

Thank you!

Custom Help Pages and Guided Tasks for Unified Interface in Dynamics 365

Formerly, Learning Path – A complete new overhaul for guided help is Custom Help Panes in Dynamics 365



Enable Custom Help Panes

Access your System Settings for enabling this feature in your organization –

  1. Go to Settings > Administration > System Settings. Then switch “Enable Custom Help Panes and Guided Tasks” to Yes if already set to No.


Creating Custom Help Panes

Let’s see how you can configure these Custom Help Panes in your Dynamics 365 CE environment for different environments –

  1. For example, for Contact entity, if you navigate to the Question Mark option on your top navigation bar, a Custom Pane will show up. If the above System Settings is not turned on, it’ll navigate to Microsoft Docs instead.

  2. It’ll expand the Pane as follows. You can then click on the three vertical dots as shown and click on Edit –

  3. Once you Edit, you’ll open the Custom Help Pane editor on which you can start configuring the Help Pane.
    You can Start Editing the Pane. You can start by entering the Title and then move down to add different Help items to the Pane.

  4. Now, I’ve added Title of the Page to Contact Help. You’ll see Save button at the button where you can Save the progress. Now, I’ll go to Insert and add a Section.
    The first item is Insert a Section.


  5. Open clicking Insert Section, I can add a title to it. Now, I’ll label this section as General.
    And it will appear as below.



    Now, you can click inside the General section and can add rest of the items there.

  6. Next, I’ll insert a Link into the General section.


    And I’ll complete the below Info for the Link.


    It’ll appear as below –

  7. Next, I’ll Edit the Pane again. And select Coachmark.


    And add Coachmark details as follows –


    Now, you can drag to where the Coachmark should be highlighted when clicked.

    Now, when you click on the generated Link, the coachmark will prompt.


  8. Next, let’s insert a Balloon.


    Enter details on the Balloon like the Link title, actual Title as it should appear on the Balloon and the Details it should read out. Finally, drag the Balloon to the element.


    And here it drag it to a relevant field.


    And finally, when the link is clicked in the Pane, the Balloon will appear as below.







  9. Next, Let’s insert a Video.


    And enter the URL of the video and set preferences accordingly.


    Once Inserted, it’ll look like below.


  10. Now, the final Items which we will insert here is an Image.


    And it’ll ask me for a Image URL which is accessible over the Internet.


    And it’ll appear as below –





    I’ve also added a YouTube video explaining the above steps in case anything from the above was not already clear –

Help Page record

In Dynamics 365, the Help Page record looks as follows if you do an Advanced Find –


You can even move this between environments within solutions itself. You can test this out in the new make.powerapps.com Solutions and Add an Existing Help Page as shown below –

Hope this was helpful!

Here are more Dynamics 365 CE/CRM posts you might want to check out –

  1. Sign up for a Dynamics 365 Project Operations (Lite Deployment) environment and provision a new instance | Power Platform
  2. Make Managed fields Required in Dynamics 365 – Managed Properties Error [Workaround] | D365 CE Quick Tip
  3. Sign up for a Dynamics 365 Project Operations (Lite Deployment) environment and provision a new instance | Power PlatformFilter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Duration field in Dynamics 365 converts Hours value to Days in Dynamics 365 | [Flow Workaround to convert in Hours and Mins]
  5. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  6. Connecting XrmToolBox to an MFA enabled Dynamics 365 environment | Azure AD
  7. Form Access Checker in new Power Apps Form Designer | Model-Driven Apps in Dynamics 365
  8. Use Rich-Text Control for Multiple Lines of Text in Dynamics 365 CE | Quick Tip
  9. Ribbon button visibility based on a field value in Dynamics 365 | Ribbon Workbench
  10. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox
  11. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  12. Track and Set Regarding are disabled for Appointments in Dynamics 365 App For Outlook message | Demystified

Thank you!!

Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate

Let’s see how we can suppress critical information about the Flow to the caller HTTP Application while sending back a response.

Scenario

The Flow will send Header information back while sending a HTTP Response to the caller HTTP Request.

  1. Here’s how the Flow will look –

    Note, that we are sending a Custom Header along as well.

  2. And along with this info, the follow Header information will also be visible in the calling application. We’ll use Postman to check this scenario.

    You’ll see that a lot of Headers have been sent back along with our Custom Header.


    And you’ll see whole lot of Headers that expose the Flow details in these Headers.

    Let’s see how we can cut this information short and not send back any unnecessary information to the HTTP Request we’ve received.

Suppress Workflow Headers in HTTP Request

Let’s see how with a simple tweat, we can avoid sending the Workflow Header information back as HTTP Response.

  1. We go to the Settings of the HTTP Request Trigger itself as shown below –


  2. Now, you see the option, Suppress Workflow Headers, it will be OFF by default.


    Your turn it ON,


  3. Now, let’s try to make a call again and see the difference. Going back to the Postman, we Send another request post you’ve saved the workflow changes above.

    We see that only 10 Headers are sent as opposed to 24 as seen without suppressing the info.

  4. And if we see what Headers are sent back, we see along with our Custom Header, only the ones which are required will be sent suppressing all the critical information.

    This is a good practice to suppress Workflows that don’t give out information in production scenarios which are not required by end application.

I’ve also made a quick YouTube video of the same. Check it out as well –

Hope this was useful!

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

  1. Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate
  2. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  3. Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
  4. Asynchronous HTTP Response from a Flow | Power Automate
  5. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  6. Tag a User in a Microsoft Teams post made using Power Automate
  7. Converting JSON to XML and XML to JSON in a Flow | Power Automate
  8. Office 365 Outlook connector in Cloud Flows showing Invalid Connection error | Power Automate
  9. FormatDateTime function in a Flow | Power Automate
  10. Make On-Demand Flow to show up in Dynamics 365 | Power Automate
  11. Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate
  12. Secure Input/Output in Power Automate Run History

    Thank you!

Navigate Screen automatically based on Timer in Canvas Power App | Power Platform

So let’s say you want to auto-navigate from a Screen to some other Screen in a Canvas Power App. [Or any other operation for that matter!]


The purpose of this post is to demonstrate how you can use a Timer control in Canvas Power App to automate some operations in your Canvas Power App!! So let’s see this scenario of navigating between screens

Scenario

Let’s consider this scenario. You want to display a Splash Screen on your App upon submission of a record notifying the user about some short info and then redirecting to the Main Screen. You don’t want the user to press a button but only want to redirect automatically after 4 seconds, for example.

  1. Here’s your Home Screen, Main Screen and Success Splash Screen.
    In this scenario, you want to create a New Record in NewAccountScreen, then redirect to SuccessScreen upon record submission.
    And once the timer times out as specified, you need to redirect from SuccessScreen to Home Screen.


    Here’s how the Success Screen will look –

Using Timer to Navigate between Screens

Now, let’s look at how we can achieve this –

  1. Take a Timer control on the SuccessScreen. Here’s how you can add a Timer from the Input menu.


  2. Now, the Timer will appear as below. You will need to hide this later on. For now, we’ll keep this on screen to see the behavior and design the logic.

  3. Now, we need to set a few parameters of the Timer –
    Duration, you can specify in milliseconds here. Example: 3000 i.e. 3 seconds

  4. Next, you’ll need to set the Start flag. By default, this is set to false. The Start is triggered when the value it set to True. This needs to be dynamically set from elsewhere i.e. in this example, you’ll need to trigger from where you come to this screen so that the Timer starts the countdown.


  5. Now, the way I set this is, first I create a variable from the place where I want to trigger the Timer to go-off. From the Form Submission screen in this case.
    Now, if you see below, I’m Submitting the Form i.e. creating a new record. Then, I’m navigating to the SuccessScreen. And, finally, I’m creating and setting a variable called startTimer and set the value to true. As the Start property of the Timer accepts a Boolean value.


    Then, I’ll set this variable to the Start.


  6. Then, you’ll need to set what needs to happens when the Timer ends. So, you have to write the OnTimerEnd property as to what will happen once the Timer ends.
    Here, you’ll Navigate to the ‘Home Screen’ as per our scenario and then also, set the startTimer flag to ‘false’ since you want to reuse this again for the next submission.

  7. That’s it!! Let’s see how this will work. And you can absolutely have any different scenario which you want to do with a Timer.

Also, here’s the Microsoft Documentation on the Timer Control for Canvas Power Apps – https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-timer?WT.mc_id=DX-MVP-5003911

Working

So, here’s how it will behave. For demo purpose, I’ve kept the Timer visible on screen for you to see it in action –

Hope this was helpful!

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

  1. Search on multiple columns from a Dataverse table in a Canvas Power App Gallery control | Power Platform
  2. Call a Flow from Canvas Power App and get back response | Power Platform
  3. Enable Custom Code Components (PCF Controls) to be imported in a Canvas Power App | Quick Tip
  4. Retrieve Hashtags from Text in a Canvas Power App | Power Platform
  5. Rich Text Control for Canvas and Model-Driven App | Quick Tip
  6. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  7. Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform
  8. Clear a field value & Reset Form in a Canvas Power App [Quick Tip]
  9. Implement real-time search in Gallery of CDS records in a Canvas Power App | Power Platform
  10. Implement character length validation in a Canvas Power App | Power Platform
  11. Implementing Exit app, Logout and Confirm Exit features in a Canvas Power App
  12. Variables in Canvas Power Apps | Global and Context

Thank you!

Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate

While using Dataverse connector [formerly known as Common Data Service (Current Environment) connector] for different operations, List Rows is one of the common Actions we use in Flow implementations with Dataverse.

If using FetchXML Query as filter is your choice, there one of the most common issues with an XML is having an Invalid XML due to the special characters in the data we are passing.
Many times, this issue goes unidentified since we end up checking only syntax!

Here’s what you can also add as an additional check to escape the special character scenario in FetchXML query in a List Rows action.

Invalid XML Issue – Special Character

Let’s look at one of the common examples where you’ll see this error on runtime when a FetchXML issue appears

  1. You have a Flow wherein you are using FetchXML query to list records in Dataverse connector using List Records action.


  2. But when happens is, when this Flow Runs, it results in an error on the List Records step.


  3. And if you look at the right hand pane for the error, it could be a Invalid XML error which you would get in Dataverse (or while working in Dynamics CRM if you have experienced in the past).


  4. So, let’s look at what could be wrong in this case among several other reason of using FetchXML and getting syntactical errors.
    If you look at my XML below, it looks like there could be some parameters that have special characters in them and hence, your XML might fail if not anything else.


    Let’s look at how we can resolve the same.

encodeURIComponent() function

As a solution to this, you can use the encodeURIComponent function in Flow to counter this problem –

  1. Now, in ideal cases, you parameters could be coming in from elsewhere which you would add in the FetchXML as parameters.
    Let me store the same in a sample String Variable for now.


    In the Value, I’ll look for an expression called as encodeUriComponent()



  2. Then, I simply enter the value which I’ll pass on to the Fetch XML filter to be used later on. And then I enter the value in the function.


    And it looks like this in your variable.


  3. Now, you just pass this on to the Fetch XML itself.

  4. And now, this should work successfully

Here’ is the Microsoft Docs of the function to encore URI and help streamline special characters – https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#encodeUriComponent?WT.mc_id=DX-MVP-5003911

Hope this was helpful!

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

  1. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  2. Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
  3. Asynchronous HTTP Response from a Flow | Power Automate
  4. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  5. Converting JSON to XML and XML to JSON in a Flow | Power Automate
  6. Office 365 Outlook connector in Cloud Flows showing Invalid Connection error | Power Automate
  7. FormatDateTime function in a Flow | Power Automate
  8. Trigger Conditions not working in a Cloud Flow? Here’s Why | Power Automate Quick Tip
  9. Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
  10. InvalidWorkflowTriggerName or InvalidWorkflowRunActionName error in saving Cloud Flows | Power Automate Quick Tip

Thanks!!

Search on multiple columns from a Dataverse table in a Canvas Power App Gallery control | Power Platform

One of the most common scenarios is to be able to perform a Search on the Dataverse table like Accounts, Contacts etc. across multiple columns. Just like you would do on a Quick Search in a Dynamics 365 CE (CRM).

Let’s see how we can replicate this using Search() function in Canvas Power App to implement Search across multiple columns in a Canvas Power App.

Gallery and Search Control

As a typical setup, I’ll implement a Gallery control to populate all Accounts and have the Search Text Input control for the user to enter the search term. Let’s see how we can set this up quickly –

  1. I’ve added a Gallery control that will populate the Accounts from the Dynamics 365 (Dataverse) instance and I’ve added a Search which is a Text Input which user can use to enter the Search term.


  2. Here are the fields which are selected to be displayed on the Gallery. Account Name will be shown larger in bold and below is the City to give it a subtitled look.


  3. Once this is set, we’ll look for Items of the Gallery and proceed to modify it. You’ll see the Default Items populated already based on how you populated the Gallery when you connected to your Dataverse.
    Let’s modify this.


  4. Now, we’ll clear the Items formula bar and then write the below Search() function –

    Search – Denoted by Blue arrow, Search() function is used in Canvas Apps to Search from a Data Source but first selecting thee data source in the first parameter, then the Search Term and finally listing all thee columns of the data source separated by commas. Here’s thee official documentation of the Search functionality as provided in Microsoft – Docs https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup?WT.mc_id=DX-MVP-5003911

    Accounts – Denoted by Green Arrow, Accounts if the Data Source i.e. thee Dataverse environment which is fetching theee Accounts table and populating the Gallery.

    SearchInput.Text – Denoted by Orange arrow, SearchInput.Text is the text which users will enter to Search from the Dataverse i.e. from Accounts table in order to show up.

    Fields – Denoted by Red Underline, the fields can be listed from the Data Source and the Search will be carried out amongst those columns.

Working

Now, let’s see how this will work –

  1. By default, if the Search Box is blank, all the records will be shown.


  2. Once, users start to enter text into the same, the Items of the Gallery will start populating based on the Search.


    I’ve also implemented this using the Filter function as well – Implement real-time search in Gallery of CDS records in a Canvas Power App | Power Platform

Hope this was useful!

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

  1. Call a Flow from Canvas Power App and get back response | Power Platform
  2. Enable Custom Code Components (PCF Controls) to be imported in a Canvas Power App | Quick Tip
  3. Retrieve Hashtags from Text in a Canvas Power App | Power Platform
  4. Rich Text Control for Canvas and Model-Driven App | Quick Tip
  5. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  6. Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform
  7. Clear a field value & Reset Form in a Canvas Power App [Quick Tip]
  8. Get Dynamics 365 field metadata in a Canvas App using DataSourceInfo function | Common Data Service
  9. Debug Published Canvas Power App with other users using Monitor | Power Platform
  10. Download a File from a Canvas Power App using a button | Power Platform
  11. Dependent OptionSets in a Canvas Power App for 1:N related CDS entities | Power Platform

    Thank you!!

Call a Flow from Canvas Power App and get back response | Power Platform

One of the most commonly searched topic is being able to Run a Flow from a Canvas App. And this has been demonstrated by many users over a period of time.

This is my attempt to summarize the same. Hopefully, this will clear out in a simpler way!!

Scenario

In this scenario, I will call a Flow using a Button and send the number in the TextBox, the Flow will do some calculation and I will get back the result which I’ll use to store and utilize. Simple!

Create a Flow

Let’s see how you can add a Flow to Canvas Power App –

Before we begin, remember, only the Flows which are outside a solution will be recognized inside a Canvas App.

  1. Here is my Cloud Flow. Since the Trigger of the Flow is a Canvas Power App, I’ll search for PowerApp in the Connectors and select the PowerApps connector.
    It has 1 trigger which is called as PowerApps.


  2. Once I select, I start the Flow with the trigger and then I’ll go on to declare 2 variables to do a simple operation.


  3. Now, I want to request Number 1 in the Canvas PowerApp which will be passed to the Flow.
    So, in the Dynamic content, you’ll notice Ask in PowerApps

  4. As I select this, a variable will be auto-created with will be the name of the variable “Number 1” (spaces will be removed), followed by _Value. Hence, resulting in Number1_Value.


  5. Next, I’ll create another variable to just multiply these 2 numbers together and produce a result. So, here’s my third variable. (Just for the sake of this example 😊)


  6. Now, to send back a Response to the calling Canvas PowerApp, I’ll again search for PowerApps connector in which and then look for the Action which is called as Respond in Power App

  7. Once I select that, I can then pass on my variable which is a result of my calculation.


  8. And I’ll send the result back to the calling PowerApp.

Accepting Parameters in Flow from Canvas App

Let’s look at the other part of the implementation where I will have a button pass value to the Flow and get back results.

  1. In my Canvas App, I have this structure where I have a Textbox called ‘ValueToSend‘, a button called ‘ProcessButton‘ and a DataTable called ‘ResultTable‘ to show the result.

  2. Now, in order to add a Flow on the trigger of the Process Selected button, I’ll select the button first and then make sure OnSelect is highlighted and then follow the step below.
  3. Now, let me add the Flow to the App first. I’ll navigate to Action and click on Flow.

  4. Upon selecting Power Automate, I’ll be shown all the Power Automate Flows detected by the App. Remember, only ones NOT in Solutions will be detected and available for selection.

  5. Upon clicking it, it will be added to the Power App and appear in the Data above and the Flow will be ready in the Formula Bar for you to complete calling it.


  6. Now, as you click on the Formula Bar to start writing the Flow, you’ll be asked the first parameter which we added as Ask In PowerApps in our Flow above.

  7. So, I’ll enter the TextBox which I had created i.e. ValueToSend, for example. And then close the Flow and then enter a dot to select the Outputs for Flow has to offer.
    As you see, I can now select the Output Parameters which we had selected.

  8. Once I select that, the Flow will send the value that I pass and collect back the calculatedValue from the Flow.



  9. Now, this is not stored anywhere, so it’s recommended you store it in a Variable/Collection for your use later.
    In my case, I’ll add it all to a Collection to populate the DataTable later on. Hence, I’ll add the entire thing to the Collect() method


  10. Next, since I want to display thee result in the label, I’ll assign the Label’s Text property to the variable I created above and collected Flow result in.


    Now, let’s Run this example.

Running

Now, when I call the Flow by pressing the button once I enter some value, the result will be calculated and the Collection will store the answers sent back by the Flow and it’ll keep adding to the collection on each request.

Likewise, your scenario could be anything per your implementation.

  1. First call to Flow


  2. Second call to Flow

Hope this was useful!!

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

  1. Retrieve Hashtags from Text in a Canvas Power App | Power Platform
  2. Rich Text Control for Canvas and Model-Driven App | Quick Tip
  3. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  4. Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform
  5. Clear a field value & Reset Form in a Canvas Power App [Quick Tip]
  6. Get Dynamics 365 field metadata in a Canvas App using DataSourceInfo function | Common Data Service
  7. Debug Published Canvas Power App with other users using Monitor | Power Platform
  8. Download a File from a Canvas Power App using a button | Power Platform
  9. Implement real-time search in Gallery of CDS records in a Canvas Power App | Power Platform
  10. Log Canvas Power App telemetry data in Azure Application Insights | Power Apps
  11. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate
  12. Launch URL on a Data Table Text column selection in a Canvas PowerApp | SharePoint Lists

Thank you!

Make Managed fields Required in Dynamics 365 – Managed Properties Error [Workaround] | D365 CE Quick Tip

On some instances, there are Managed fields in Dynamics 365 CRM (or CE if you want to call it) where we can’t change the required level of the field from Fields i.e. on the database level. And you get the below error –

Here’s an alternative way to do it.

Scenario

Let’s consider this scenario.

  1. Although Microsoft suggests you don’t change the behavior of Managed fields since they are designed with a purpose. However, let’s consider this scenario where you want to make the Parent Account for Lead as required on the form.
    When you try to change the Requirement Level as follows




  2. And while saving this change, you get this error.


    So how do we do it? Let’s see.

Workaround – Business Rule

Now, to overcome this particular scenario you can implement a simple Business Rule to make it required as follows –

  1. If the field can’t be made Required on a database level, you can make it required on the form using Business Rule. Here’s how you create your Business Rule.
    As the Business Rule starts with the condition, here’s the check you need to add in case the field value is not entered.


    The condition I used is as below – Check if Parent Account for lead Does Not Contain Data

  2. If this is True, then go ahead and add a Step for True condition. Add Set Business Requirement Level

  3. And in this, you need to set the Business Required Status to Business Required as show below.

  4. And the result is the Business Rule which looks like in #1 above. Now, save your changes, Publish the Rule, Activate and check.
  5. The result will be that the field is not required once it doesn’t have data forcing the user to enter data for the same.

Hope this was helpful! Here are some more D365 posts which you might be interested in –

  1. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  2. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  3. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  4. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  5. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  6. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  7. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  8. Call Azure Function from Dynamics 365 CRM using Webhooks
  9. Show Ribbon button only on record selection in Dynamics CRM
  10. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!