Trying to code in some business rules that I thought would be simple. I guess I was wrong, haha.
Basically, trying to stop the addition of a Sales Delivery if the business partner and warehouse meet certain criteria...
IF @object_type = '15' AND @transaction_type = 'A'
IF (SELECT CardCode from ODLN where CardCode = @list_of_cols_val_tab_del) IN ('BUSINESSPARTNER1','BUSINESSPARTNER2')
SELECT @error = -2425
SELECT @error_message = N'Failure!'
This doesn't work at all, doesn't seem to check the document being added.
Help please? 😊
Thanks in advance!