Question / Problem:
The users might incorrectly attach a document/workitem to a wrong invoice in Oracle, that could happen by opening a document in the viewer and click on the button "Associate MarkView Document" while an irrelevant invoice is already open in the Invoice Workbench form.
It can be produced by following the steps below:
- Open Payables Workbench Form, find an invoice that is already attached to a document, click on the attachment icon and select the document and click on show document.
- Then close the attachment form and go back to the invoice workbench form ( but keep the document open in the browser ).
- Create a new line and enter a new invoice info and save, then click on the attachment icon, and select "MarkView Document" as category and click on the icon “Associate MarkView Document” and save.
- Now the document that left open is attached to the new invoice, and in the properties table of the workitem history output shows the Invoice ID and Invoice number of the new invoice that has been created.
Answer / Solution:
To fix the issue, follow the steps below:
1- Find the attachment document id of the current document of the old invoice by running the query below:
select ad.attached_document_id as attched_document_id, ad.pk1_value , ad.document_id as oracle_document_id, dvl.*, ad.*, aia.*
from fnd_documents_vl dvl, fnd_attached_documents ad, ap_invoices_all aia
where to_char(aia.invoice_id) = pk1_value
and ad.document_id = dvl.document_id
and aia.invoice_id = '&Invoice_id';
Note: the InvoiceID used in this query is the one for the original invoice.
2- Then delete the link between the old invoice and the current document that has wrong details.
a- From the front end (If you have delete privileges on the attachment form):
Login into Oracle as Payables Manager > Invoices > Invoice Entry > Search and retrieve the invoice that is wrongly attached to that document, then click on the attachment form button, highlight the document and click on delete.
b- Or from the back end (Only for internal Environments, not to be provided to the customers):
-- Backup Attachment Table in Oracle:
Create table fnd_attached_documents_bak as select * from fnd_attached_documents;
-- Remove the link between the invoice and the document.
delete from fnd_attached_documents
where attached_document_id = “The value retrieved from the first query in point#1”;
3-Now the link between the document and the wrong invoice has been removed, to link the document to the right invoice do the following:
Make sure that document is open on the viewer, then open the original invoice in the invoice workbench, click on the attachment icon, and create a new link by selecting “MarkView Document” as a category, then the “Associate MarkView Document” button gets activated, click on it which links the current invoice with the document that is already open in the browser.
Finally the document got linked back to the original invoice and shows the correct invoice data (Invoice number and id in workitem/document history report output).
|MarkView for Oracle||Any|