Documents disappear when posting PO invoice,packing slip, etc.

I’m having issues posting documents (file,doc,note) on a Purchase Order packing slip, invoice, etc. It will appear to be there, once the item is posted, it doesn’t show when I use Inquiries to see the packing slip or invoice.

Here is what I do:

  1. Open a PO.
  2. Click Posting → Packing Slip.
  3. Click the Document Handling Button.
  4. Click New → Document.
  5. Type a note in the doc and Save.
  6. Name the Document on the line in the Document handling Form.
  7. Click Save.
  8. Post the Packing Slip as usual.
  9. From the PO, click Iniquiry → Packing Slip.
  10. Goto the Document Handling Form.
  11. THERE IS NO DOCUMENTS.

I can see in the code, and subsequently in the database, that the DocuRef.RefTableId is for the Purchase Order header instead of the Packing Slip Journal or the Invoice Journal. If I change the DocuRef.RefTableId and DocuRef.RefRecId to the journal, it will show like I expected.

I am fairly new to AX and have tried to track down in the code where the RefTableId is set but cannot find it. I have also heard that lots of times, it’s a configuration issue instead of a code issue.

Can anyone point me in the right direction as to how to find out if my setup is correct?? Thanks in advance!

There is no transference of notes. If you attach them to the purchase order they are not automatically on invoice, receipt or all related tables, they are simply on the purchase order.

If this is the case, can you tell me why this works??

  1. Post an invoice like normal on the PO.
  2. From the PO, click Inquiry → Invoice.
  3. Goto Document Handling form.
  4. Attach a new document.
  5. Close the Doc Handling Form.
  6. Close invoice.
  7. Re-opon invoice.
  8. Re-open doc handling.
  9. DOCUMENT IS STILL THERE.

It seems to me, that if i am on the PO, and choose doc handling, it would attach to the PO - which currently works.
But if I’m on the Invoice for the PO, it seems it would attach to the Invoice for that PO.

Is this not the case?

It makes sense now. There is no record for the packing slip for the doc to attach to. But once i’ve created hte invoice, it would be able to attach since the record is there for the packing slip.

Thanks!

Yes that is the one, you are attacing it to the created record, the DocuRef holds the table number, which in your second example would be the invoice table not the sales order table [:D]