Stored procedure to block delete specific type of Draft Document
How can I add control on stored procedure to block delete specific type of Draft Document, for example AR Invoice draft.
Following code not working, is there anyway to block it?
IF @object_type = '112'
IF @TRANSACTION_TYPE = 'D'
SELECT @error = -1, @error_message = 'Remove AR Invoice draft is not allowed'
FROM ODRF T0
WHERE T0.ObjType='13' AND T0.DocEntry = @list_of_cols_val_tab_del
Thanks in advance