Transform your Model-driven app to a multi-session app using settings solution component


Another awesome “settings” trick from the author..thanks Mehdi

Mehdi El Amri's avatarXRM Tricks (Power Platform & Dynamics CRM )

This blog will discuss new component added to Power Apps. It is about the “Settings” component. Indeed, this component allows adding a configuration layer for a model-driven application. This allows to easily activate or deactivate a feature for a model-driven app.

For more information on this component, I invite you to read this excellent blog from Power Apps team


Scenario:

Enable app makers to transform a classic model-driven app into a multi-session one using the settings components. You can check out the demo at the end of the blog before continuing reading.

Step 1: Create the Setting Definition

First, create a solution through make.preview.powerapps.com. Yes, we will implement everything on the preview version of PowerApps. Then, create a new setting definition. In my case I named it “Enable Multi-Session Feature” and applied the following values:

Step 2: Implement the logic

Let’s go back to the initial needs. The goal is…

View original post 271 more words

Dynamics CRM: Create Custom Autonumber Plugin Using Azure SQL Sequence


temmyraharjo's avatarTemmy Wahyu Raharjo

In this blog post, I reviewed the Auto Number attribute that already can handle the common scenario. There is a way to give a simple conditional Auto Number from Nishant Rana that you can read here. But what if we want to implement a more complex scenario to generate the Auto Number part for instance we want to generate Auto Number based on Type? For example, if Order Type A, generate A001. If Order Type B needs to generate B001? The possible solution is to create our own code. So today we will try to create auto number code using Azure SQL Sequence (Sequence can ensure every call will get unique value).

Create Azure SQL Database

You can go to your portal.azure.com >SQL databases> hit+ Createbutton > fill theSubscription,Resource Group, fill theDatabase name, createServer.

For…

View original post 876 more words

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

Dynamics CRM: Proving Auto Number Data Type Is Legit!


temmyraharjo's avatarTemmy Wahyu Raharjo

I just saw Nishant Rana’s post about the auto-number data type that you can check here. And to be honest, I just knew about it and felt intrigued to test it. My expectation was pretty low about this data type (to handle lots of requests and result to duplicate numbers in the end). TL;DR (Too Long; Didn’t Read), IT’S NOT!

For the testing purpose, I created the below Table with auto-number attribute with the name new_autonumber:

new_test and the auto-number attribute

You can create the auto-number attribute, usingAuto Number Manager by Jonas Rapp (XrmToolbox Tool)/via new Solution UI (I’m using XrmToolbox):

Auto Number Manager by Jonas Rapp

For generating the entities inside the c# code, I used the below code:

using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Web.Configuration; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Tooling.Connector; namespace CrmCheck { class Program { static void Main(string[] args) { var connectionString = WebConfigurationManager.AppSettings["connectionString"]…

View original post 154 more words

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