Hi all,
i have defind validation in sales order using transaction notification stored procedure. ex:- sales order should be based on sales quotation etc. and code is as follows
--- Sales Order Not Based On Sales Quotaion
IF @transaction_type = 'A' AND @object_type = '17'
BEGIN
IF EXISTS (SELECT T0.ItemCode FROM [dbo].[RDR1] T0 inner join [dbo].[ORDR] T1 on T0.DocEntry = T1.DocEntry
WHERE T0.BaseType = -1 AND T0.DocEntry = @list_of_cols_val_tab_del and T1.DocType= 'I')
BEGIN
SELECT @Error = 1, @error_message = 'Sales Order not based on Sales Quotation '
END
END
now i want to apply this validation to only 'ITEM' type document instead of 'SERVICE' type document.
how to do it?