If we use "Create procedure" on a non-existant procedure on the Rec variable inside a page extension, the procedure is created inside the current page extension instead of the table extension or the base table.
pageextension 50034 "My Test" extends "Customer Card"
{
trigger OnOpenPage()
begin
Rec.Test123(); // executing "Create Procedure" here, will create the following procedure
end;
// Procedure should be created either as a procedure in
// tableextension (if available)
// or
// in the base table (if available)
internal procedure Test123()
begin
Error('Procedure Test123 not implemented.');
end;
internal procedure Foo()
var
Vendor: Record Vendor;
begin
Vendor.Test999(); // "Create Procedure" isn't shown (probably intentional)
end;
}
For "normal" records (last example in the code), we don't even get the "Create Procedure" action for unknown procedure names, so I assume this is intentional as I don't think it's that trivial to implement. If so, maybe you could also just disable to show the "Create procedure" on the Rec variable.