cancel
Showing results for 
Search instead for 
Did you mean: 

Stored procedure notification

Former Member
0 Kudos

Hi

  I have 1 dropdown field in Sales Order . I want when user Updates or Add record it should not be left blank and message is given through Stored Procedure Notification . I cannot define  any value as default.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

HI  Sunny Brar ...

Use this TN Sp for Invoice ... Change the U_Udf to your field

If @object_type='17' and @transaction_type in ('A','U')

BEGIN

If Exists (Select T0.DocNum from ordr T0

Where t0.u_udf is Null and

T0.DocEntry = @list_of_cols_val_tab_del)

BEGIN

Select @error = -1,

@error_message = 'Please fill up the UDF'

End

End

Hope helpful

Regards

Kennedy

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi Sunny,

You can define default value for UDF.

Former Member
0 Kudos

Hi

  I don't want to define any Default value

Thanks

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi Sunny Brar,

Try this :

IF
(@Object_Type='17') AND (@transaction_type in (N'A', N'U'))

BEGIN
IF
Exists (SELECT T0.[U_rgJobno]

FROM
ORDR T0

WHERE
T0.DocEntry = @list_of_cols_val_tab_del)

Begin
SET
@error = 10

SET
@error_message = N'Please enter UDF'

End

END

Note: Add your UDF field above in select statement

Hope helpful.