[quote user="Juliem"]
Hi,
I'm trying to understand some logic in the Item Templ. Mgt. codeunit
There is a procedure CreateItemFromTemplate which calls ApplyItemTemplate procedure (line 30)
This procedure is declared twice, with different number of arguments (lines 35 and 40). I'm trying to understand how the system know which one to trigger
I have a sandbox where it calls the first version (2 arguments) which then calls the 2nd version with the 3rd argument set to false
I have another sandbox where it calls directly the 2nd version with the 3rd argument set to true

[/quote]
Yes, but my understanding us that you can not have the same procedure signature called with different number for parameters.
So if i say
Procedure MyTest (A: record Customer; b: record Vendor);
begin
end;
Procedure MyTest (A: record Customer; b: record Vendor; c: record Item);
begin
end;
My point is that you can never have AL end up executing the first version of the procedure if you have added the record item to the calling parameters,
It will always execure the procedure that match the parameters it is called with.