Remember to specify either the 'OnAction' trigger or 'RunObject' property on an action
Describe the bug When all codeanalyzers installed/activated , this code gives warnings because runobject or onaction trigger is not filled in. It isn't. I am using an event to call this action. Is this not the correct way?
{ "resource": "/q:/BC AL Projects/PBL Project Admin/src/pageextension/Pag-Ext52157423.PBLPAJobCardExt.al", "owner": "generated_diagnostic_collection_name#0", "code": "AA0194", "severity": 4, "message": "Remember to specify either the 'OnAction' trigger or 'RunObject' property on an action.", "source": "AL", "startLineNumber": 28, "startColumn": 17, "endLineNumber": 42, "endColumn": 18 }
To Reproduce Steps and to reproduce the behavior: this code invisual studio code
[EventSubscriber(ObjectType::Page,Page::"Job Card", 'OnAfterActionEvent', 'PBL Request approval', false, false)]
local procedure OnRequestApprovalActionJobCard(var Rec: Record Job)
var
//Defaultprojectstatus: Record "Default project status";
//Job: Record Job;
Jobstatus: Record "PBL-PA Project Status";
NoStatusFoundError_Lbl: Label 'No Status Code found with project type %1.';
begin
//PBPA01 20190117 HM <<
Jobstatus.RESET();
Jobstatus.SETRANGE("Project No.", Rec."No.");
Jobstatus.SETRANGE("Project Type", Rec."PBL Project Type"); //TODO
Jobstatus.SETRANGE("Status Type", Jobstatus."Status Type"::"Project Requested");
IF Jobstatus.FINDSET() THEN BEGIN
Rec."PBL Status Code" := Jobstatus."Status Code";
Rec."PBL Status Type" := Jobstatus."Status Type";
END ELSE
ERROR(NoStatusFoundError_Lbl, Rec."PBL Project Type");
//PBPA01 20190117 HM >>
end;
Expected behavior No warning
Screenshots
If applicable, add screenshots to help explain your problem.

5. Versions:
- AL Language: 4.0.199169
- Business Central: 14.0.35916.0 + Application 35970 (BE Business Central 14.5)
You need to add a ';' in the OnAction.
Trigger OnAction
begin
;
end;
This will remove the warning.
(but it's a bad idea to create subscribers on your own actions. It makes it harder to navigate to the code, and is slower. Rather call a function in a codeunit with Rec as a parameter.)
Ok, thanks