Quickly visualize the VIEW data using Power BI quick report (preview) in Dynamics 365 / Power Apps


With a recent update to the platform, now we can use Power BI quick report (preview) on the view page in a model-driven app, to visualize the data.

To enable the feature, open the model-driven app in the modern app designer.

Here we are opening the Customer Service Hub app in the modern app designer.

Click on Settings.

Navigate to Features and enable the Power BI quick report visualization on a table option.

Publish and Play the app.

We can see the Visualize this view option added in the command bar for all the views within the app.

It asks for getting a power bi license if we do not have one.

Click on Get a free license and set up the Power BI Account.

Now Visualize this view option will open the Power BI report.

The visuals will run under the context of the view selected – All Contacts in this case.

The visuals will use some of the fields and add additional fields to the table in the report.

Here we are running it against the My Cases view.

The Power BI quick report –

The report gets updated based on the fields selected in the data pane. Power BI adds or removes charts based on the selected fields as shown below.

We can also further Personalize the visual

Visualize this view doesn’t run on selected records for a view.

The option is also available for the Activities view.

The option also works on a Custom table/entity.

Get all the details here –

https://docs.microsoft.com/en-us/power-bi/create-reports/dynamics-quick-create-report

Hope it helps..

Advertisements

Using Custom Process Action with Code for integration – Dynamics 365 / Microsoft Dataverse


There are 2 ways to create a custom message in Dataverse, one is through action, and the other is through Custom API.

Check the post on Custom API

https://nishantrana.me/tag/custom-api/

https://nishantrana.me/2021/01/13/use-custom-api-to-create-custom-messages-in-dynamics-365/

Custom Process Action vs Custom API –

https://docs.microsoft.com/en-us/powerapps/developer/data-platform/custom-actions#compare-custom-process-action-and-custom-api

With custom process action we can define business logic using a workflow, and we can extend it using either custom workflow activities or registering the plugin.

If we are just defining action just for the custom message and then using plugin/custom workflow activity for defining all the logic (and not using workflow), it is recommended to use the Custom API feature instead.

Here however we will have a look at the way we had implemented global custom action for integration with the external system for any inbound call to CRM.

Below is our sample custom global action with one input and output parameter.

For the output parameter, we are setting the value in the step.

Next, we have 2 plugin steps registered one on the pre-validation stage and the other on post-operation.

Pre-validation because we want to run the logic outside the transaction, perform validation, log exceptions, etc.

Pre-validation example –

https://nishantrana.me/2018/11/05/plugin-on-pre-validation-stage-in-dynamics-365-ce/

https://community.dynamics.com/365/sales/b/crminogic/posts/plugin-pre-validation-operation-to-show-an-error-message-as-well-as-log-the-error

Post-operation because action’s output parameter would only be available in the post-operation and used Shared Variable to pass the custom response from pre-validation plugin to post-operation.

On executing the action

We get the following plugin trace logs as expected.

One for pre-validation

Post-operation

Hope it helps..

Advertisements

How to – Use the new command designer to customize the command bar – Dynamics 365 / Power Apps


Using the modern app designer either open an existing model-driven app or create a new model-driven app in https://make.powerapps.com/

Select Edit >> Edit in preview

Select any entity/table and select the Edit command bar (preview)

The different command bars that can be edited are the Main grid, main form, subgrid view, and the associated view.

  • Main Grid view

  • Main Form view –

  • Subgrid view–

  • Associated view –

The legacy / classic button is not supported currently.

Check out all the known limitations

https://docs.microsoft.com/en-gb/powerapps/maker/model-driven-apps/command-designer-limitations

limi

Let us try adding a new command/button in the Main Form, and see what options do we get there.

Select + New command or the + New option

It adds a new button with the label NewCommand with options to duplicate, hide, move up and down, etc.

The different properties that can be configured for the new command –

Property

Description

 

Label

To set the label

Icon

To set the icon either using icon or web resource

Tooltip

Set tooltip title and its description.

Order Number

Customize the Order of the command

Action

Either run formula or run javascript

 

Open Formula Bar

 

Library for Run JavaScript

Visibility

 

 

Open Formula Bar for Show on Condition

Let us Save and Publish

Click on Play and open a lead form.

We can see the new command added.

Get all the details here –

https://docs.microsoft.com/en-gb/powerapps/maker/model-driven-apps/command-designer-overview

Hope it helps..

Advertisements

Use ExecuteWorkflowAction to call Action and Workflow in CDS Destination KingswaySoft – Dynamics 365 / Dataverse


We can use ExecuteWorkflowAction in the CDS/CRM Destination Component of KingswaySoft’s SSIS Integration Toolkit for Dynamics 365 to execute workflow and custom action.

If there is no Destination Entity defined (left blank), Workflow/Action options will list down all the global action available


On selecting a specific entity/table e.g. lead entity, it is listing down the actions tied to the lead entity and the on-demand workflows created for the lead.

Here new_TestLeadAction is a custom action and Test Lead Workflow On-Demand is an On-Demand Workflow.


Suppose we have the following input and output parameters defined in the custom action.


Within the CRM Destination Component, we can see the input fields listed for mapping along with the LeadId field where it expects the GUID of the lead record to be passed, against which action has to be executed.


Let us create a custom Global Action – Test Global Action and see if it is listed there or not.


We can see the custom global action listed when there is no destination entity selected as we saw earlier.

However, we also get the error that the Entity as input argument is not supported.


We get the same error for the input parameter of type Entity Collection.


For Entity Reference input it works properly and expects Entity Ref and Entity Ref Type to be passed.

We have removed the input parameter of type Entity and Entity Collection and added an output parameter named SampleOutput.

Surprisingly within our SSIS package, we could not figure out to get the output parameter’s value back from the Action.


We asked KingswaySoft Technical Support (support@kingswaysoft.com), and as usual, within a couple of hours the experts there were able to confirm our understanding that output parameters are not supported in the CDS Destination component for now.

Check other posts on KingswaySoft and Dynamics 365 / CRM https://nishantrana.me/2020/10/16/ssis-kingswaysoft-and-dynamics-365/

Hope it helps.

Advertisements

Set Auto Number field value conditionally in Dynamics 365 / Dataverse


Recently we had a requirement to use auto numbers for lead records.

However, based on where the lead records are being created from, we wanted to specify a different prefix to it.

For leads created manually, the format should be prefixed “L” followed by “– “and then 10 digit sequence number.

L-{SEQNUM:10}

And if created through API the prefix should be B.

B-{SEQNUM:10}

To achieve this, we can define an auto-number field with the following format.


Next, we can have a bool field (default – false) in the lead table, to identify if it is being created from the API, which we can set while creating the lead record through API.

And a Pre Create Plugin on Lead to check the value of that field.

If it is set (true), that we can replace the Prefix from L to B in the auto-number field within the context.

In the Pre Create plugin, we get the next sequence in the auto-number field, so simply replacing/setting the value of the auto numbering field did the trick.

Lead created through Web Application –

Lead created through API –

Here uniqueness was more important than the next sequence of the lead record so this solution worked.

Also check –

https://jonasr.app/2020/03/anm-unique-seq/

https://nishantrana.me/2021/11/09/few-key-points-auto-number-field-in-dataverse-dynamics-365-ce-crm/

Hope it helps..

Advertisements

Lookup Behavior – Minimum character to trigger search and delay between trigger – Dynamics 365


Within Power Platform Admin Center – (https://admin.powerplatform.microsoft.com/)  through Environments >> [Name] >> Settings >> Behavior >> Lookup Behavior settings we can control the minimum number of characters entered before triggering the search in the and delay before the search is triggered for the lookups.

  • Minimum number of characters to trigger typeahead search – Default (2)
  • Delay between character inputs that will trigger a search – Default (250ms)

Here we have updated the value to 5 and 5000 respectively for our testing.

The result –

Lookup Behaviour

After 5 characters are entered, it waits for 5 seconds before searching (loading..)

Also check –

https://nishantrana.me/2021/06/22/advanced-lookup-in-model-driven-power-apps-dynamics-365/

https://docs.microsoft.com/en-us/power-platform/admin/settings-behavior

Hope it helps ..

Advertisements