This event can be used to set new stocklocation or supplier for required items
Example and syntax
procedure OnAfterCalcItemRequirement(aParams:TScriptOnAfterCalcItemRequirementParams);
var
I : Integer;
begin
// Code to å loop through the item requirement
for I := 0 to aParams.ItemRequirementList.Count - 1 do
begin
{The custom field S2 is here used to indicate that the item should always
be taken from the 'NOR' stock location even when the products stock location has a different value}
if aParams.ItemRequirementList.Items[I].S2 = 'NOR LAGERTRANSAKSJON' then
aParams.ItemRequirementList.Items[I].StockLoc := 'NOR';
end
end;