Thursday, 6 November 2014

How to restrict Duplicate Customer Po Number on Sales Order Form

Steps to Restrict Two Duplicate_PO_Number On Sales Order Form :
Complete the following in TEST instance
1. Please open the sales order form

2. Navigate to: Help -> Diagnostic -> Custom Code -> Personalize

3. Create new sequence as cust_po_number
Select Function

In Condition Tab
Trigger Event: WHEN-VALIDATE-RECORD
Trigger Object: ORDER
Condition:
:Order.CUST_PO_NUMBER is not null and ((select 'Y' from oe_order_headers_all
where cust_po_number = :Order.cust_po_number and header_id <> :Order.header_id and
rownum=1)='Y')
Processing Mode:Not In Enter-query Mode

4. Select Action Tab
Seq: 1
Type: Message
Language: All
Enabled: Yes
Message Type: Warn
Message Text:
=’Duplicate Cust PO number exists is’||nvl(:Order.CUST_PO_NUMBER,’NULL’)

5. Save the changes and try to reproduce the issue.
6. If successful migrate solution to other instances

1 comment:

  1. Hi,
    Many thanks. How can we apply this to one customer only.

    Raz.

    ReplyDelete