Skip to Content
avatar image
-1
Former Member

transaction notification

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;

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 08 at 05:47 AM

    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
    
    
    
    Add comment
    10|10000 characters needed characters exceeded