I would like to allow only a select few transactions from using a specific transactions from using a specific GL account.
Declare @CogsAcct as nvarchar(15)
If @object_type = '60' and @transaction_type in ('A','U')
Select @CogsAcct = (select top 1 AcctCode from ige1 where docentry = @list_of_cols_val_tab_del order by acctcode)
where docentry = @list_of_cols_val_tab_del
If @CogsAcct = '500025'
set @error = 1
set @error_message = 'Please Change Cost Control Account.'
The problem with the code is that it only checks the lowest value GL account to compare against, and not all values used in the transaction and this could exist on any line.
How would i use the transaction notification to validate all lines?
Thanks in advance