Are RecIds unique across Common tables in Dynamics AX 2012?

我的梦境 提交于 2019-11-29 12:08:05

When Microsoft Dynamics AX inserts records into SQL tables, a unique RecId is assigned to each record regardless of the company each record is associated with. The field is 64 bit long and unique per table.

In Axapta 3.0 and below RecIds were unique per company account and 32 bit long. Thus a company could have no more than 4 billion records as the RecId could be negative.

Polymorphic design? I am not sure what you mean in this context, but given a RecId you do not know which table it belongs to, and you need that information in order to find the record:

public Common findRecord(TableId _tableId, RecId _recId) 
{
    Common record = new DictTable(_tableId).makeRecord();
    select record where record.RecId == _recId; 
    return record; 
}

In SQL no table is called Common. It is an AX concept, you may consider it an interface containing methods only.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!