cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query for user defined form

Former Member
0 Kudos

Hi experts,

I want query to update some fields in my user defined form using stored procedure on clicking of ADD button.

Explanation:

I have User Defined form call "DC request" with Object 'DCLM'..On click of Add button, it is saving my record info into the form. But in one field if value in not entered then it is saving as 'Null'.

Addon is already made, can not change in coding.

I want to update this field with '0' value through query in stored procedure on click of Add Button. Can anyone help me out to achieve this.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Team Bone.

Please try below Transaction Notification which will Restrict User to ADD if Field_Name is NULL and then User Need to Enter ZERO i.e. 0 for Adding.

IF @OBJECT_TYPE = 'DCLM' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')

BEGIN

If Exists (Select T0.DocEntry from [Table_Name] T0 Where ( T0.Field_Name is null  OR  T0.Field_Name = ' ' ) AND T0.DocEntry  = @lisT_of_cols_val_Tab_del )

begin

SET @error = -100000

SET @error_message = 'Filed_Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'

End

End

Please change Table_Name and Field_Name with with UDO field.

Hope this help

--

--

Regards::::

Atul Chakraborty

Former Member
0 Kudos

This is done...Sorry to disturb you...!