0% found this document useful (0 votes)
259 views

Duplicate Inv Num Personalization

This document outlines steps to create custom code personalizations in Oracle Payables to prevent duplicate invoice numbers from being entered or updated. It describes: 1) Creating a PRE-INSERT trigger to check for duplicate invoice numbers and return an error if found 2) Creating a PRE-UPDATE trigger to check if an update would create a duplicate invoice number and return an error if so 3) Verifying the personalizations by testing duplicate invoice number entries and updates

Uploaded by

prasanthbab7128
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
259 views

Duplicate Inv Num Personalization

This document outlines steps to create custom code personalizations in Oracle Payables to prevent duplicate invoice numbers from being entered or updated. It describes: 1) Creating a PRE-INSERT trigger to check for duplicate invoice numbers and return an error if found 2) Creating a PRE-UPDATE trigger to check if an update would create a duplicate invoice number and return an error if so 3) Verifying the personalizations by testing duplicate invoice number entries and updates

Uploaded by

prasanthbab7128
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Payables Responsibility > Invoice > Entry >Open Invoice Workbench


Form Menu >Diagnostics >Custom Code> Personalize
Add Description : XX_DUP_INVOICE_INS
Select Trigger Event : PRE-INSERT

Condition:

0<(select count(*) from ap_invoices_all ai where invoice_num =:INV_SUM_FOLDER.INVOICE_NUM and vendor_id

=:INV_SUM_FOLDER.VENDOR_ID
and org_id = :INV_SUM_FOLDER.org_id and UPPER(invoice_type_lookup_code) = UPPER(:INV_SUM_FOLDER.INVOICE_TYPE)
and ((:inv_sum_folder.invoice_id IS NULL) OR :inv_sum_folder.invoice_id <> ai.invoice_id))
Processing Mode: Both
Validate the Query

2.Click on Action Tab


Message Type: Error
Note: Message_Type Error will show error and NOT allow to save Duplicate Invoice Numbers. You can keep Message_type as Show if you want to alert
users but still allow them to save Duplicate Numbers.
Message Text : You have entered duplicate Invoice Number for same Supplier. Please Use Different Invoice Number
Validate the Message
Enable The Personalization

3. Create one more personalization to prevent invoice number update on existing invoice to duplicate number.
Add Description : XX_DUP_INVOICE_UPD
Select Trigger Event : PRE-UPDATE

Condition:

0<(select count(*) from ap_invoices_all ai where invoice_num =:INV_SUM_FOLDER.INVOICE_NUM and vendor_id

=:INV_SUM_FOLDER.VENDOR_ID
and org_id = :INV_SUM_FOLDER.org_id and UPPER(invoice_type_lookup_code) = UPPER(:INV_SUM_FOLDER.INVOICE_TYPE) and
((:inv_sum_folder.invoice_id IS NULL) OR
:inv_sum_folder.invoice_id <> ai.invoice_id))
Processing Mode: Both
Validate the Query

4.Click on Action Tab


Message Type: Error
Note: Message_Type Error will show error and NOT allow to save Duplicate Invoice Numbers. You can keep Message_type as Show if you want to alert
users but still allow them to save Duplicate Numbers.
Message Text : You have entered duplicate Invoice Number for same Supplier. Please Use Different Invoice Number
Validate the Message
Enable The Personalization

5.Verify the Personalization by Entering


Duplicate Numbers

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy