I think you need to create unbound action using codeunit to create a custom here is an example from Microsoft documentation https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-creating-and-interacting-with-odatav4-unbound-action
codeunit 50100 "MiscOperations"
{
procedure Ping(input: Integer): Integer
begin
exit(-input);
end;
procedure Delay(delayMilliseconds: Integer)
begin
Sleep(delayMilliseconds);
end;
procedure GetLengthOfStringWithConfirmation(inputJson: Text): Integer
var
c: JsonToken;
input: JsonObject;
begin
input.ReadFrom(inputJson);
if input.Get('confirm', c) and c.AsValue().AsBoolean() = true and input.Get('str', c) then
exit(StrLen(c.AsValue().AsText()))
else
exit(-1);
end;
}