cancel
Showing results for 
Search instead for 
Did you mean: 

transaction notification

Former Member
0 Kudos

kindly find the below code that i want to prevent update on JE

Can any one help me

IF (:transaction_type = 'U' ) AND :object_type = '30' THEN

select distinct T0."TransId" , T0."Memo" FROM OJDT T0 INNER JOIN JDT1 T1 ON T1."TransId" = T0."TransId"

WHERE T0."TransId" = list_of_cols_val_tab_del;

error := -100;

error_message := N'You Cannot update remark on JE' ;

END if;

Accepted Solutions (0)

Answers (1)

Answers (1)

KennedyT21
Active Contributor
0 Kudos

Try this

if @object_type ='30' and @transaction_type in ( 'U')    
   BEGIN

If Exists(
select distinct T0."TransId" , T0."Memo" FROM OJDT T0 INNER JOIN JDT1 T1 ON T1."TransId" = T0."TransId"

WHERE T0."TransId" = list_of_cols_val_tab_del
) 
Begin
                  
                                    SET @error = -2
                                    SET @error_message = 'You Cannot update remark on JE'
                              End
   
   END