Enable email address validation (preview) in the Model Driven app / Dynamics 365


To enable the new email address validation feature (preview), log in to Power Platform Admin Center >> Settings >> Features >> Data Validation


Switch On – Data Validation. (Interestingly in one of the environments enabling this setting was enough to get the smart email validation working however in another environment had to enable the below settings as well to get that working)

Next open the Model Driven App in Maker Portal – App Designer and switch on  Enable Smart Email Address Validation Control 

EmailOn

Below we can see it validating the email address while we enter its value

We get the below messages

And this works for the email field in a custom entity as well.

Refer – https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-validation-email-column

Also, check the similar feature we have for Sales Hub App

Hope it helps..

Advertisements

How to – Extend (Recover) the trial environment (Dataverse / Dynamics 365)


On logging into Power Platform Admin Center, we would see our trial environment as expired

And then within one day or so, we would see them deleted inside Recently deleted environments

Select the deleted environment and Select Recover

Within 10 -15 minutes we can see the environment recovered with the trial extended for 13 more days.

Hope it helps..

Using existing Web Resources (image) and Icons for button/ command – Dynamics 365 / Model-driven apps


In case of a new command that is added through Command Designer, we can specify an existing Icon using the Use Icon option.

We can also search and specify an existing Web Resource

Similarly, we can use Icon Gallery (XrmToolBox Plugin) to search for the existing web resource image and icons.

We can then use Copy Name option to get the full path of the web resource

msdyncrm_/KnowledgeManagement/_imgs/KnowledgeSearchProvider.svg

use it to specify Modern Image for our buttons

Hope it helps..

Advertisements

Hide Show Button in Command Bar / Ribbon in Dynamics 365 / Model-Driven App (For Quick Reference)


Open the App in the App Designer, select the Edit Command Bar for the table

Also, check the limitations of the Command designer, the important one being that the pre-existing classic commands cannot be customized with the new command designer.

For the new Command added, set its Visible property based on the status of the current selected item/record.

More on Power Fx

Now similarly if we want to show the button only for an existing record by updating the RibbonDiffXML, we can write the following DisplayRule based on FormStateRule



Hope it helps..

 

Advertisements

Using Sort, Distinct, Filter together for combo box Items– Canvas Apps (Dataverse)


Just sharing a simple example of applying a formula to the Combo box Items property, which includes Sort, Distinct, and Filter (If).

Below is our Combo Box bound to a lookup field of type Customer. If Contact is the option selected in the radio control, we want to show Contact’s Full Name sorted else Account’s Account Name field.

If( radioBtnCustomer.Selected.Value = "Contact",
    Sort(Distinct(Filter(Contacts,Status = 'Status (Contacts)'.Active),'Full Name'),
        Value,
        SortOrder.Ascending
    ),
    Sort(Distinct(Filter(Accounts,Status = 'Status (Accounts)'.Active),'Account Name'),
        Value,
        SortOrder.Ascending
    )
)

The result –

Also to clear the selection in the combo box when the user changes the option from contact to account and vice versa we can use the Reset function.

Check the below links to learn more about working with Customer lookup –

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-references#show-the-columns-of-a-customer

Hope it helps..

Advertisements

Combo box showing blank values in case of multiple conditions – Canvas App (Dataverse)


Recently while trying to filter combo box Items we were getting the values but it was coming as blank instead of showing the name field.

Below is a sample Form – connected to Leads and Source Campaign is the combo box field (lookup to Campaign)

As we can see without applying the filter we can see the name (Display fields) populated.

Now let us try to filter it based on the Campaign Type field.

Here we have applied a single filter condition.

We can see the combo box getting filtered correctly.

Now we are introducing a variable just to filter it based on condition.

Till now filtering works as expected.

Now let us introduce else condition here.

We can see the combo box getting filtered but not showing the name field of the Campaign set as a display field. Through developer tools also, we don’t see the name returned in this case. The same is the case if we use multiple If or Switch in the formula.

The solution is to filter on Campaigns data source directly, instead of the corresponding Choice field in the Lead.

The result –

Hope it helps..

Advertisements