Easy AutoNumber Utility for Dynamics 365 July 2017 Update (v9)

Today, 1st October 2017 marks the GA release of Dynamics 365 v9. As of today, any new Dynamics 365 environments will be provisioned as Version 9 instances (also known as the July 2017 update for Dynamics 365).

If you haven’t yet heard, there are plenty of goodies thrown in for users, customisers and developers alike such as Virtual Entities, Multi Select Option Sets and a whole new fresh Unified Interface across mobile, tablet and web.

One of the late additions we first caught sight of at Ignite last week was native auto-number fields. Yay. Historically, these had been filled with various bespoke free and commercial solutions which often gave varied results. There is no need to use third party solutions or create your own anymore. Thanks Microsoft!

Unfortunately due to time constraints, Microsoft have only just added this as a feature under the hood via the API – it’s not available when adding new fields yet and you have to write your own code to create a field with the new Auto Number type.

Realising that not everybody has the time or inclination to open up Visual Studio every time you want a new auto-number field, we have created a Dynamics 365 solution that creates a native, future proof auto-number field for you with no code required!

Simply install this managed solution into your environment, navigate to Settings -> Solutions and click on the Easy AutoNumber icon at the top of the screen and enter the autonumber details.

This should fill the gap until Microsoft add this themselves in an upcoming release, so use it to make sure your auto-numbers are backwards compatible.

Download the managed solution here : EasyAutoNumber_1_0_managed

Notes and Guidelines

– If you want more information on this, watch Matt Barbour’s session at Ignite on this.

– To install, download the solution first, go to Settings -> Solutions and import it like you would any solution.

– This will only work on Dynamics 365 V9 or later. It uses Dynamics 365 OData web services to create the attribute.

– Enter the entity name in the first text box – e.g contact.

– Enter the desired format in the second text box – e.g Auto–{DATETIMEUTC:[yyyyMMdd]}-{SEQNUM:6}-{RANDSTRING:6}

– Enter the desired attribute label in the second text box – e.g Record ID or Reference

– Enter the desired attribute name in the fourth text box. The attribute prefix must be a valid prefix such as new_xxx – e.g. new_autonumber or similar.

– Once you have added your autonumber attribute, it will be available to add to a form/view as required. You need to add this to the form or view yourself.

– For now, you must delete the attribute using the Dynamics interface and recreate it again if you want to change the format

– We are awaiting official documentation on the format which should be released soon, (so if you get the date prefix working, let us know).

– As always, best practice is to use this on non-production systems and migrate your solutions between environments as required.

Any questions or comments, contact me, Brian Illand, on Twitter or LinkedIn.

About Technical Hero: Dimitri 'Reverso Engineero' Chevkov

The Technical Hero of the Dynamics 365 Heroes Team
A programming wizard, I was a child prodigy and had hacked into 7 separate government agencies by the time I was 16 years old. Older, wiser, more experienced and seeing the errors of my impetuous youth, I now spends my time helping others to extend their Dynamics platform beyond what was previously thought as the limit. I can rush into developing a solution to a problem which would be better solved using the Dynamics 365 platform capabilities, and am constantly kept in check by Howard.

2 Responses

Leave a Reply