Skip to content

Tag: Dynamics 365

Limits for custom parameters

Posted in Dynamics 365, and Power Platform

Have you ever asked how many characters you can pass as parameter to a Javascript event handler or to a HTML webresource? I do, because I like to give a consultant or the customer the possibility to pass dynamic values in form of JSON objects or even whole functions without touching my code.

HTML webresource

The limit here is at 1.500 characters.

Javascript event handler

I think there no limit. Really. I made a test with up to 2.400.000 characters without any problems. The only thing that I would mention – do not exaggerate it as I did, because the performance suffers quite a lot.

Internet Explorer and promises

Posted in Dynamics 365, Power Platform, and Revive

Microsoft shows us on Get started with the Microsoft Dynamics 365 Web API (client-side JavaScript) how to create a re-usable function using promises. Between the description and the example is a little note box that points out that Internet Explorer 11 doesn’t implement native promises. Most other browsers support promises natively, IE is the problem child – again.
Microsoft further advises that there are several polyfills and libraries which will implement promises to IE. But they don’t tell you how do this in an effective way.

Detection

As you don’t want to add and load superfluous libraries, you have to detect if the browser has promises implemented. In my first approach I used modernizr. 2KB more just for detection. That is not what I wanted and searched for a plain js solution and found it at stackoverflow.

if(typeof Promise !== "undefined" && Promise.toString().indexOf("[native code]") !== -1)
{
    //Your browser is unsuspecting, paste your polyfill or library here.
}

Agony of choice

Now that we can detect if the browser has implemented promises or not, which polyfill or library should we implement additional? My decision fellt on the smallest possible solution I found – ‘ES6 Promise polyfill’ with only 2KB.

ImportSequenceNumber field in Dynamics 365

Posted in Dynamics 365, Power Platform, and Revive

Today I stumbled over the meaning and purpose of the “ImportSequenceNumber” field in Dynamics 365 (or Dynamics CRM, If you have not got used to it like me).

The ImportSequenceNumber field itself

It’s an integer field that is reachable through the field list in a solution. It is searchable but you are not able to add it to a form.

ImportSequenceNumber purpose

Every import in Dynamics 365 is numbered with an ascending number which is globally stored in the “Organization.CurrentImportSequenceNumber” attribute. Every record created during an import gets this number as value for the ImportSequenceNumber field.
By this way Dynamics 365 can show you all records that are created during an specific import or let you delete all records created by an import.