On the item journal you have the 'Entry Type' option of 'Purchase', 'Sale', 'Positive adjustment' and 'Negative adjustment'. As we only want our users to use the 'positive/negative adjustment' options, could the system be set up to give an error message if the user selects one of the other options?
Many thanks.
0
Comments
This already appen becase the option of entry type are more then 4 you can have Transfer,Consumption,Output also.
If not write code in the trigger validate of the field
Thanks.
In a form, create a new form (copy of the standard form). In the trigger "On validate" insert this code
IF ("Entry Type"<>"Entry Type"::"Positive Adjmt.") AND ("Entry Type"<>"Entry Type"::"Negative Adjmt.")
THEN error(.......);
1) Using a case statement:
Case "Entry Type" of
"Entry Type"::Purchase,"Entry Type"::Sale:
begin
Error('Your error message goes here');
end;
end;
2)using if statement:
If ("Entry Type"="Entry Type"::Purchase) or
("Entry Type"="Entry Type"::sale) then begin
Error('Your error message goes here');
end;
'Positive adjustment's and 'Negative adjustment's will continue to work as normal as you have not told the system to do anything different with them.
Remember : Keep it simple