Skip to content
  • There are no suggestions because the search field is empty.

AX - How do you find the physical path (bin file) of a document from the DocID? 

Versions: All

Issue:
How do you find the physical path (bin file) of a document from the DocID?

Solution: 
1. Determine the Application ID. To do this, run the query below on the AX database:
 Select * from AE_APPS
Record the appid from the results for the particular application.

2. Determine the docid. This will be found in the AE_DTx table (where x = the appid 
found in step 1). If you know the index data for the particular document you're 
looking for, add that to the query to narrow down the results.
 Select * from AE_DTx
 Where field1="TEST"
Record the docid from the results.


3. Determine the objectid associated with the file:
 Select * from AE_DLx where docid = y
 x = the appid found in step 1
 y = the docid found in step 2
Note: There may be many entries returned from this query. You will need to use the 
below columns to determine which file you are looking for
 Pagenum = page within the document
 Subpage = this is usually for COLD or a multi-page tiff
 Pagever = page version 1=first through 255 (max versions)
Once you have determined which of the entries you are looking for, you can record 
the objectid and the pathid to determine the file's physical location.


4. Determine the path of the file:
 Select * from AE_PATHS where pathid = z
 z = pathid found in previous step
Record the path from the result set


5. Compute the hashing scheme to find the full path. The storage path is a 
combination of the path found in step 4, plus the application name, plus the hashing 
scheme (defined in this step)
Compute:
 A = Objectid
 A / 1024 = X
 X / 1024 = Y
 X - (1024 * Y) = Z
path from AE_PATHS\APP NAME\Y\Z\objectid.bin

Example:
 Application Name = "Test Application"
 Path = "C:\TestAXPath"
 ObjectID = 786924
 786924/1024 = 768.4804 ==> Rounded down to 768.
 768/1024 = 0.75 ==> Rounded down to whole number only = 0.
 768 - (1024 * 0) = 768
Result:
 C:\TestAXPath\Test Application\0\768\786924.bin