
I can't seem to update my subforms when I've populated them with records. From a codeunit I have the following code
frmXMLCompare.GetCompares(recProdBomLineXMLDifferenceTMP,recprodBomLineNAVDifferenceTMP);
On the main page I have this function
GetCompares(VAR recProdBomLineXMLTMP : TEMPORARY Record "Production BOM Line";VAR recProdBomLineNAVTMP : TEMPORARY Record "Production BOM Line")
CurrPage."XML Comapre Bom Lines".PAGE.BuildTable(recProdBomLineXMLTMP);
CurrPage."XML Compare Bom Lines Nav".PAGE.BuildTable(recProdBomLineNAVTMP);
On the subpages I have this function
BuildTable(VAR recProdBOMLine : Record "Production BOM Line")
DELETEALL;
recProdBOMLine.RESET;
IF recProdBOMLine.FINDSET(FALSE,FALSE) THEN REPEAT
Rec := recProdBOMLine;
IF INSERT THEN;
UNTIL recProdBOMLine.NEXT = 0;
IF FINDFIRST THEN;
CurrPage.ACTIVATE(FALSE);
The other Subpage
BuildTable(VAR recProdBOMLine : TEMPORARY Record "Production BOM Line")
DELETEALL;
recProdBOMLine.RESET;
IF recProdBOMLine.FINDSET(FALSE,FALSE) THEN REPEAT
Rec := recProdBOMLine;
IF INSERT THEN;
UNTIL recProdBOMLine.NEXT = 0;
IF FINDFIRST THEN;
CurrPage.ACTIVATE(TRUE);
There is 100% records in the tables as If i do a frmXMLCompare.RUN; in the coduenit the page will show with populated subforms..
*This post is locked for comments
I have the same question (0)I should add the page is open when the codeunit is called, which is why there should be no need for a frmXMLCompare.RUN;