Assigning recordID to a new DB entry.

How is a new recordID generated and registered in Dynamics AX?

I need to insert new entries from an Intranet application into one of the AX database tables. To do this I must learn how to generate and properly register the recordID for these entries.
So far all “experts” have answered “It can’t be done”. However, as long as AX itself can do this, I can copy this mechanism outside AX…

Besides assiging of the RecIds, AX has logic maintaining the data consistency. Hence inserting records direct to the db is very risky. The better approach is to access AX using the Business Connector and let the business logic handle inserts and updates.

Best regards.

Hi Geir,

I second the previous comments. It is not advisable to mess around with record Id creation outside Ax. Easiest approach would be to use business connector to create records in Ax.

Best wishes,

For 99,99 % of the cases I totaly agree with you, but in this case I do not have that option. I know the database well enough to maintain data consistency, at least regarding the table in question. I already perform updating of existing entries, but need recordID knowledge to do inserts…



RecID assignment is only known in the dark side of the kernel [:)]

To be safe you should use the business connector and use this dll in your intranet site.

Will this table only be filled from your 3th party app? In that case you could create your own logic to have 1 recId for 1 record in that specific table.

Data will also be added from the AX side. The easiest for me would be to communicate with the database. That is why I need to solve this ID problem. I can not see why this should be so difficult… I expect this to be a very simple function once you get hold of it.

The alternative is to get access to the AX installation and find out how to make PHP work with the business connector. I don’t even know if that is possible, and to me that seems to be a loooooong way to go for a very small task. To add one line in a database table shouldn’t be that much work!!!