on 03-05-2013 6:39 AM
Hi
I have created some UDF fields (U_field1,U_field2,U_field3,U_field4) at Header Level . I want when user closes Purchase Order none of the blank fields should be blank. One field data type is Date
Thanks
Hi,
This notification throw error msg, even if any one of those 4 UDF is null.
I think this helps you.
If @object_type = 22 and @transaction_type = 'L'
Begin
If exists (Select T0.DocEntry from OPOR T0 where (T0.UDF is null OR T0.UDF2 IS NULL OR T0.UDF3 IS NULL OR T0.UDF4 IS NULL) AND T0.DocEntry =@list_of_cols_val_tab_del)
Begin
select @error=2,@error_message = 'Field is missing'
End
End
Regards
Pravin Jebadoss.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI fine the SP below
If(@object_type = '22' and (@transaction_type = 'A' or @transaction_type = 'U'))
Begin
IF EXISTs (SELECT T0.DocEntry
FROM OPOR T0
WHERE T0.DocEntry = @list_of_cols_val_tab_del and (T0.U_UDf1 Is Null OR
T0.U_UDf2 Is Null OR T0.U_UDf3 Is Null OR T0.U_UDf4 Is Null)
Begin
SET @error = 109
SET @error_message = N'Please check the four Udfs '
End
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Try this:
IF (@transaction_type='L') AND @Object_type = '22
begin
IF exists (select t0.docentry from OPOR t0 where (U_field1 is null and U_field2 is null and U_field3 is null and U_field4 is null) and t0.docentry=@list_of_cols_val_tab_del )
begin
SET @error = 86
SET @error_message = 'Please enter udf1,udf2,udf3,udf4'
end
end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.