Data in Table does not appear on Form

I inserted data into a table with basic x++ code (AX2012). The data does not appear on the form. i compared the result with a manual input and everything looks the same. have a look at the following screenshot (yes I LOVE snagit):

this is the source code i used for the import:

oh…and nope: there is NO filter active on the form!

You have to consider related tables.

If the form does an inner join to a related table that also needs to be populated.

Have a look at the form data source.

thank you so much for your answer!

there was a record missing in the table “ReqSitePolicy”!

Is there a quick way / standard approach to check if related tables need to be populated? or do you simply need to know this?

In NAV you would program something on the “OnInsert” event. Every time when a InventSite record is inserted a ReqSitePolicy is inserted automatically.

I am sure there is something similar in AX, but when i look in the insert method of the table, then I can not find anything similar…

Here is how i fixed this problem currently:

0434.10-17-2012 5-37-00 PM.jpg

Thanks! This helped me out as well.

Antti

I have same problem. There is a record for site in InventSite table but not in reqsitepolicy table.

How did you fix this issue?

ReqSitePolicy is having an inner join with inventSite table in the InventSite form, if the relevant configuration key is disabled then it will have a passive link with the InventSite(so in this case the ReqSitePolicy records are not necessary).

ReqSitePolicy reqSitePolicy;

InventSite inventSite;

insert_recordset reqSitePolicy (InventSiteId)

select SiteId from InventSite;

run this code in a job, this will insert all the site records into site policy table.