Should auto number be set to 'Yes' or 'No' for id attribute?

Hi all,

We are building a web application and we are creating all the entities from scratch for it. I am preferring to keep all my entity's id attribute 'AutoNumber' property set to 'Yes'. Can someone suggest if I can go with 'AutoNumber' set to 'Yes' approach? There are many reference attributes also. If so, are there any consequences for this? I heard somewhere that setting 'AutoNumber' to 'Yes' would impact the data when we deploy our application from one environment to another. Which one is the preferred approach when developing enterprise level application?


Keeping it as auto-number is the preferred way to do it.

As for the impact when deploying applications from one environment to another indeed, the data created in different environments might have different IDs (as primary keys), but shouldn't impact your logic unless you really rely on the main ID of the entity to uniquely identify records across environments.




Keep them automatically numbered, but on static entities it is preferable to remove the automatic numbering

Hi Bruno,

Thanks for the response. Can you please tell me why is it recommended to remove auto numbering from static entities?

Hi Krishnnambal,

It is recommend to keep auto-number property to 'Yes' so that you don't need to worry about sending an extra attribute for ID, OS will take care of it in sequential manner with unique number. Regarding deployment, until and unless you are not migrating data, you don't need to worry about it. While creating reference attribute, give attention on 'delete rule', its very importance to select proper delete rule.

Official Doc for auto-number :*qi458c*_ga*MjAxMTUxMjU4NC4xNjUwMzg5MjQ0*_ga_ZD4DTMHWR2*MTY1MjcxMTI3MS4xLjEuMTY1MjcxMTg4Mi42MA.. 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.