Unretrieved values on the companyinfo Table in AX 2012R2

In AX 2012 R2, table inheritance tables are all stored in the same table.
inher1
So the Company Info table is on SQL level stored in the table DirPartyTable. They did this for performance reasons. But what happens when you insert a new Colom on that table. We get unretrieved values like below screen.
inher2
Normal fields in AX tables are not allowed to be NULL, so there is always an empty string or a zero value in it.  (Note DirParTable fields are of not null)
inher3
The fields are NULL  so the will not use disc storage.
So how do you solve this. In the next example I added an field on DirOrganizationBase,  So all derived table records needs to be updated
UPDATE DIRPARTYTABLE SET YOURFIELD =   WHERE YOURFIELD IS NULL and (
INSTANCERELATIONTYPE = 6886 or — DirOrganizationBase
INSTANCERELATIONTYPE = 2975 or — DirPerson
INSTANCERELATIONTYPE = 41   or — CompanyInfo
INSTANCERELATIONTYPE = 2978 or — DirOrganization
INSTANCERELATIONTYPE = 2376 or — OMInternalOrganization
INSTANCERELATIONTYPE = 2377 or — OMOperatingUnit
INSTANCERELATIONTYPE = 5329    – OMTeam
)
In case of a number or enum it is SET YOURFIELD = 0

2 thoughts on “Unretrieved values on the companyinfo Table in AX 2012R2.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.