Invoice Workbench Custom Code [message #591683] |
Tue, 30 July 2013 22:52 |
skimmer333
Messages: 23 Registered: August 2010 Location: Adelaide, Australia
|
Junior Member |
|
|
Hi all.
I have a requirement to add custom code to the invoice workbench.
This custom code is required to take the PO number the invoice is matched to and add it to the invoice header description field.
Currently I can't get it to fire correctly. It's firing before the invoice has been matched.
Here is my current setup:
Trigger Event: WHEN-VALIDATE-RECORD
Trigger Object: LINE_SUM_FOLDER (have used INV_SUM_FOLDER as well)
Condition: -blank-
Processing Mode: Not in Enter-Query Mode
Actions
Object Type: Item
Target Object: INV_SUM_FOLDER.DESCRIPTION
Property Name: VALUE
Value: =select 'PO NUM'||max(po_number_ from ap_invoice_lines_v where match_type = 'ITEM_TO_PO' and invoice_id =${item.inv_sum_folder.invoice_id.value}
If i select Validate it comes up with the 'PO NUM' and the po number. However, when i enter the invoice, it enters PO NUM into the description field, but after matching, it doesn't update the field.
Any help would be great.
Cheers,
Russell.
|
|
|