I've have multiple procedures in a codeunit and i want to call a certain procedure OnAction button in a page.
trigger OnAction();
var
<Var> : CodeUnit <CodeunitName>
begin
<Var>.<FunctionName>;
<Var>.Run;
end;
what I'm it doing wrong?
Btw the problem was related to nav cannot execute al code on role center it cancel the modifications on runtime soi thought i was doing something wrong and you don't have to be and ass about it.
You asked about calling function in codeunit from OnAction trigger. This does not interfere with page type. If you don't remember basic calling procedure, you should ask programmer to do it before data damage by wrong code.
> @lubost said: > You asked about calling function in codeunit from OnAction trigger. This does not interfere with page type. If you don't remember basic calling procedure, you should ask programmer to do it before data damage by wrong code.
My code was right if you check the first post but if you open Microsoft nav forum you can see their comment about addig al code to role center page.
Answers
Statement <Var>.RUN; calls OnRun trigger of the <Var> codeunit
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
How about if you have something helpful to say go ahead and say it if you don't just SHUSH
> You asked about calling function in codeunit from OnAction trigger. This does not interfere with page type. If you don't remember basic calling procedure, you should ask programmer to do it before data damage by wrong code.
My code was right if you check the first post but if you open Microsoft nav forum you can see their comment about addig al code to role center page.