cancel
Showing results for 
Search instead for 
Did you mean: 

Stored Procedure Notification

ramco1917
Participant
0 Kudos
410

Hi

 In A/p Invoice if  G/l Account 160012,160045 is hit then user must enter something in Udf Field Doc No.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

narayanis
Active Contributor
0 Kudos

Hi,

You will have to write a TN on journal entry and it will trigger at every transaction. You can give a check on this. I do not have system in front of me to check before giving it to you. Apologies in case of any error.

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

Declare ActCode varchar(100);

Declare TestUDF varchar(100);

 

select JDT1."Account"  , PCH1."U_TestUDF" Into ActCode, TestUDF from JDT1 Inner Join PCH1 On JDT1."CreatedBy" = PCH1."DocEntry" where JDT1."TransType" = 18 and PCH1."DocEntry" = :list_of_cols_Val_tab_del;

If (ActCode = '123' or ActCode = '234') And IfNull(TestUdf,'') = '' Then

SELECT '-1' INTO error FROM DUMMY;
SELECT 'Please enter a value in UDF';
END IF;

End If;

Regards

 

 

Answers (0)