cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict Journal Entry field to update Second time

Former Member
0 Kudos

    Hello,

kindly help me out to solve the solution through SP that how i can control single journal Entry field called "Ref2" . if this field populate once can't be update 2nd time else remaining all field can be update/modified.

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member204969
Active Contributor
0 Kudos

For the header level Ref2 you can use this, inserting in your  SBO_SP_TransactionNotification stored procedure after the line

-- ADD YOUR CODE HERE

IF @object_type = '30' AND @transaction_type ='U'

Begin

declare @lref2 nvarchar(100)

set @lref2=(select top 1 a.ref2 from AJDT a

    where a.Transid=@list_of_cols_val_tab_del

    order by a.loginstanc desc )

If @lref2!=''

and @lref2 != (select j.ref2 from OJDT j

    where j.Transid=@list_of_cols_val_tab_del)

Select @error =1,@error_message='You can not change Ref2 !'

End

Former Member
0 Kudos

Excellent Solution...! Done.

i was just missing data type "varchar" instead of nvarchar...

at the end again thanks....:)

Answers (0)