Skip to main content
Solved

How to link uploaded files to inventory items in a generic inquiry

  • May 4, 2023
  • 1 reply
  • 358 views

Forum|alt.badge.img

I am trying to get a file id associated with an image for a stock item. I found this information on stack overflow that states that you can link these tables for the entity table and the UploadFile table through the NoteID field. However, I am not having success with this. I think this may be because Stock Items don’t have an associated note id and those are only for screens with associated documents like a sales order, but I’m not sure. I am linking these tables in this way:

I’ve been able to have partial success with this, but it’s very slow and only successful for around 60% of the results. Does anyone know if there is a field that can link between PX.Objects.IN.InventoryItem and PX.SM.UploadFile?

Best answer by aaghaei

You will need to join Inventory with NoteDoc on Inventory.NoteID = NoteDoc.NoteID and NoteDoc with UploadFile on NoteDoc.FileID = UploadFile.FileID. 
The revisions of Files are kept in UploadFileRevision table and can be joins on FileID to UploadFile

View original
Did this topic help you find an answer to your question?

1 reply

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1206 replies
  • Answer
  • May 5, 2023

You will need to join Inventory with NoteDoc on Inventory.NoteID = NoteDoc.NoteID and NoteDoc with UploadFile on NoteDoc.FileID = UploadFile.FileID. 
The revisions of Files are kept in UploadFileRevision table and can be joins on FileID to UploadFile


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings