Saturday, January 22, 2022

How To Restrict A Customer To Create Foreign Currency Transaction In Transaction Workbench

 Goal:



How to restrict a customer to Create Foreign currency Transaction in Transaction workbench


Solution:

Till now we did not restrict the customer to Create/Save foreign currency transactions in transaction workbench. System allow the customer to enter the foreign currency transactions.
We should restrict the customer to enter foreign currency transactions by doing form personalization.

Process to define form personalization:

Navigation: Receivable Manager --> Transactions --> Transactions 

Go to Help --> Diagnostics --> Custom Code --> Personalize


A new form will be open and enter the following information.

Seq : 10
Description : Restrict the Customer Creating the Transaction with Foreign Currency
Level : Function
Enabled : Yes

Under the condition tab enter the following information

Trigger Event : WHEN-VALIDATE-RECORD
Trigger Object : TGW_HEADER
Condition : :
 TGW_HEADER.INVOICE_CURRENCY_CODE_MIR != (select acpca.currency_code
  from hz_cust_profile_classes hcpc,
       hz_customer_profiles hcp,
       hz_cust_accounts hca,
       AR_CUST_PROF_CLASS_AMTS acpca
 where hcpc.profile_class_id = hcp.profile_class_id
   and hcp.party_id = hca.party_id
   and acpca.profile_class_id = hcpc.profile_class_id
   and hca.account_number =:TGW_HEADER.RAC_BILL_TO_CUSTOMER_NUM_MIR)

Processing Mode : Both
Level : Site



Under the Actions Tab
Seq : 10
Type : Message
Message Type : Error
Message Text : Enter your Error message text


Save your work.

Test Result:


No comments:

Post a Comment

How to improve blog performance

Improving the performance of a blog can involve a variety of strategies, including optimizing the website's technical infrastructure, im...