Hi,
We are on SAP B1 9.1 PL 05.
Try following code
Declare @Object_Type Nvarchar (20)
Declare @Transaction_Type Char(1)
Declare @Error int
Declare @Error_Message Nvarchar(100)
if @Object_Type = 17 and @Transaction_Type in ('A', 'U')
Begin
if exists (select T0.Cardcode , T1.Itemcode from Ordr T0 inner Join Rdrd1 T1 on T0.Docentry = T1.Docentry where T0.CardCode in ('C00001' , 'C00002' , 'C00003') and T1.Itemcode in ('I00001', 'I00002', 'I00003) and T0.docentry = @List_of _cols_val_tab_del)
Begin
Set @Error = -10
Set @Error_Message = 'Product Reservation In Force' Can't Sell These Products'
End
End
Kindly replace cardcodes and itemcodes as per your requirements.
Regards
Narayani