on 11-20-2018 11:10 PM
Dear Experts,
I need a validation(SBO_SP_TRANSACTIONNOTIFICATION) query that will block the addition or update of sales invoice when the items selected in row does not contain itemcode = 'ITM-001'.
But when the items in the row has at least on of the above itemcode it should add.
Regards.
Justice
Hi,
Put Below Code in Transaction Notification.
Select T0.OINV from OINV T0
Inner JOIN INV1 T1 on T0.DOcentry=T1.Docentry
Left Outer Join OITM T2 on T1.Itemcode=T2.Itemcode
where T0.Itemcode='ITM-001' and T0.DocEntry = @list_of_cols_val_tab_del
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IF @transaction_type IN ('A','U') AND @Object_type = '13' BEGIN
IF EXISTS (SELECT T0.[DocEntry] FROM OINV T0 INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE (T1.[ItemCode] = 'ITM-001') and T0.DocType = 'I' and T0.DocEntry = @list_of_cols_val_tab_del) BEGIN SELECT @Error = 13, @error_message = 'Item is blocked' END END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any help from experts here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please clear you question you mean one code should not be allowed and if there are certain codes then this condition should not applied ?
Simply in you query deploy condition where item code = 'ITM-001' and Itemcode <> exceptional items
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.