Creation of mandatory UDF in A.R Invoice
Dear All,
I am facing the problem for mandatory field creation.
Even i write this below code when adding A.R Invoice it mandatory field is not working.
alter proc SBO_SP_TransactionNotification
@object_type nvarchar(20), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
if @transaction_type = 'A' and @object_type = '13'
begin
if exists(select T0.docdate from OINV T0 where T0.docentry = @list_of_cols_val_tab_del and
T0.U_EnvUbTm = null )
begin
select @error = 100, @error_message = N'You need enter value to the UDF'
end
end
-- Select the return values
select @error, @error_message
end
Please help me.
Thanks in Advance.
Edited by: vivek.Y on May 18, 2011 1:57 PM