cancel
Showing results for 
Search instead for 
Did you mean: 

Delivery Note

Former Member
0 Kudos

If have created a UDF to enter the weighbridge ticket no and I need this field to be Mandatory while Adding a delivery Note. The below query is executing with error. Kindly advice where have I gone wrong?

if (@object_type in (15) and @transaction_type in ('A' , 'U')

Begin

If exists (Select T0.DocEntry from ODLN T0 Inner Join DLN1 on T0.DocEntry = T1.DocEntry Where T0.DocEntry =
@list_of_cols_val_tab_del and T0.U_WBno is null and T0.DocType = 'I')

Select @error = -1, @error_message = 'Weigh bridge Ticket Number is Missing'

End
End

Accepted Solutions (1)

Accepted Solutions (1)

former_member233854
Active Contributor

Probably you are missing one bracket here at the end

if (@object_type in (15) and @transaction_type in ('A' , 'U'))

Answers (0)