I'm writing a code in AL to insert all actions of all pages in the system in a table, BUT somehow looping over Record "Page Action"
, In this code snippet I've just shown the name of the action but still running this procedure
didn't show any action:
procedure populateActions()
var
PageAction: Record "Page Action";
begin
PageAction.Reset();
if PageAction.FindSet() then begin
repeat begin
Message(PageAction.Name);
end until PageAction.Next() = 0;
end;
end;
Couldn't reproduce in my local docker container with an installed
W1 22.4 (Platform 22.0.59833.0 + Application 22.4.59114.59867)
.Received a message with all Page Action names:
This is the code that was used:
Note: if you want to display a lot of messages, even if only for debugging purposes (if you don't want to use the VSCode debugger), it is recommended to use the TextBuilder data type. Not only is it faster, but also allows you to open only one message dialog at the end of the process. I didn't run your code because it would use too many resources and takes too long for me to sit and wait to see results (if the web client doesn't crash by then).
I've modified your code so that only the first 5 records are shown in message dialogs. This way I'm also receiving the first 5 Page Action names: >empty<,Responsibilty Centers,Reports Layouts,Application Settings,Setup
Please check the above code to see if it works for you. If it doesn't, could you verify that the table is not empty, e.g. by navigating to the table
http://<hostname>/<environment>/?table=2000000143&tenant=default
or by accessing the database server ...although I would be concerend if it's empty.