cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DevinFlickinger
Level: Powered On

Generating auto increment number / identifier for CDS entity?

I've seen in other posts on here that the autonumber field will be returning to CDS this month (hopefully), but at the moment I am in need of making an "in house" identifying number for our "Supplier" entity. The final format of this id needs to be in XXXX0001, (first four letters of the suppliers name in uppercase, a four digit auto incrementing number padded with zeros), so that if Amazon were our 11th supplier to be approved we would have AMAZ0011 as the ID. 

 

Our inventory manager would then use a PowerApp to add suppliers to the data base and CDS would automatically assign the in house ID.

 

My first thought was to have an autoincrementing field counting up as suppliers were added and then have Flow construct the final ID after the entry is made.

 

The only documentation that I've been able to find on doing this in CDS 2.0 has been here, https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/create-auto-number-attribut...

I do have a background as a fullstack javascript developer, but the above link assumes knowledge about the microsoft environment that I simply don't have and have been struggling to locate and understand. Any help on achieving this would greatly appreciated!

1 REPLY 1
AbeSaldana
Level: Powered On

Re: Generating auto increment number / identifier for CDS entity?

devin, 

 

Well this is an interesting topic, the same issue happens in Dynamics 365 CE, we don't have the UI to create the Autonumber, only using the code and the XRMToolBox tool, that is available to create that field type and update the seed values and the formatting. 

 

This will be easy if you update initially the Dynamics 365 CE custom entity and create the auto number and then replicate to CDS, however, that will be going into Dynamics 365 create the field and then make sure it replicates back into CDS. 

 

This is a new feature that was included in the Dynamics 365 CE 9.0 version and they didn't include the UI to create the field type, just the code option.

 

hope this helps!

 

abe.

 

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 360 members 4,332 guests
Please welcome our newest community members: