I am trying to delete rejected invoices from AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE tables each time form is opened. I am not developer so I have not access to form design, but I am allowed to use forms personalization, however I am really suprised by behaviour of this.
Below code is triggered when form is opened:
delete from ap_invoice_lines_interface where invoice_id in (select invoice_id from ap_invoices_interface where (source = 'INTERCOMPANY2' or source = 'AGENCY COMMISSIONS') and description like '%Agency%Commissions%' and org_id = 63 and status = 'REJECTED')
and second proc:
delete from ap_invoices_interface where (source = 'INTERCOMPANY2' or source = 'AGENCY COMMISSIONS') and description like '%Agency%Commissions%' and org_id = 63 and status = 'REJECTED'
I had to put them in separate actions as I was receiving error when I had them in one statement together, however this is completly different story. My problem is that althought these invoices are not visible when I open Quick Invoices form (this is were personalization is applied), when I go to other form showing interface invoices, but without this personalization I still can see them. I had similar problem when I was actually executing update statement, however when I have chosen to create invoices with Payables Open Interface (when did not and closed the form values were going back to previous state) it was updating the values to the ones changed.