I need to validate the sales order through SP.
If i choosing a sales order BP code as 'C137680' then i need to select my UDF field U_Material as 'Inside' option is mandatory. I am not suppose to choose other options.
I have created the below SP its adding without blocking(If i create other UDF options also)
IF @transaction_type in(N'A', N'U') AND @object_type = '17'
if exists (Select CardCode from ORDR T0 where t0.CardCode='C137680' and
t0.U_Materials = ('INSIDE')
and t0.DocEntry=@list_of_cols_val_tab_del )
SET @error = 10
SET @error_message = N'Inside is mandatory'