Hi,
Try this TN:
IF @transaction_type in ('A','U') AND (@OBJECT_TYPE='13')
BEGIN
If exists (select T0.DocEntry from OINV t0 where T0.DocEntry = @list_of_cols_val_tab_del and T0.[slpcode] = '-1')
Begin
SET @error = 10
SET @error_message = 'Without selecting sales employee you can not add invoice'
End
End
Thanks & Regards,
Nagarajan