Page record method requires SourceTable (PC0018)
Methods like SetRecord, GetRecord, and SetTableView can only be called on pages that have a SourceTable defined. Calling these methods on pages without a SourceTable will result in a runtime error.
Example
The following code calls SetRecord on a page without SourceTable:
codeunit 50100 MyCodeunit
{
procedure ShowPage()
var
MyPage: Page "My Dialog Page";
Customer: Record Customer;
begin
MyPage.SetRecord(Customer); // Page record method requires SourceTable [PC0018]
MyPage.Run();
end;
}
Ensure the target page has a SourceTable, or use a different approach for pages without one.