web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Updating / refreshing subform

(0) ShareShare
ReportReport
Posted on by

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)
  • Community Member Profile Picture
    on at

    I should add the page is open when the codeunit is called, which is why there should be no need for a frmXMLCompare.RUN;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans