Hi,
I have the requirement to open a page with AL, which is based on a temp. table.
I tried the following code:
----------------------------------------------------------------------
UserGroup: Record "MyRecord";
TempTab: Record "Name/Value Buffer" temporary;
PageUserGroups: Page "MyPage";
begin
UserGroup.setrange("myField","myField");
if UserGroup.findset() then0
repeat
TempTab.SetRange(Name,UserGroup."myField2");
if not TempTab.findfirst then begin
TempTab.init;
TempTab.validate(id,TempTab.id + 1);
TempTab.validate(Name,UserGroup."myFiedl2");
TempTab.Insert;
end;
until UserGroup.next=0;
PageUserGroups.SetTableView(TempTab);
PageUserGroups.Caption('My Caption');
PageUserGroups.Editable(false);
PageUserGroups.Run;
end;
Unfortunatelly, this code does not work, the page does not show the records of the temp table.
To open the page with the code does work, but it is not an option since I need to modify the caption of the page and fields after opening:
Page.run(Page::"MyPage",TempTab);
Any help is appreciated.
Michael