Dynamics CRM: Proving Auto Number Data Type Is Legit!

Temmy 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.


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.


And if created through API the prefix should be B.


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 –



Hope it helps..


Fixed – BadGateway. The request failed. Error code: ‘502’. Error Message: ‘BadGateway’ in PowerAutomate – Start and wait for an approval

Recently we were getting the below error for one of our Flows.

BadGateway. The request failed. Error code: ‘502’. Error Message: ‘BadGateway’.

Everything seemed right.

Finally, found (thanks to the forum) that the fix was to update the Approvals Administrator security role.

Provide – Read Access to System Job inside Customization tab.



This time our flow worked smoothly.

Hope it helps..


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 –



Hope it helps ..