RE: Where can a payables invoice voucher live?
That is a good suggestion, although, I would like to throw a single piece of information to be taken into consideration.
For your case, looking for the payable invoice number is not always limited to a "Voucher Number". For instance, the primary table that you excluded (PM00400, the PM Key master) holds the voucher number under the field "CNTRLNUM" or the control number.
For the script, it is definitely great provided that Dynamics GP tables reserve the "voucher number" just for the payable module, invoice number. Although, if you run the script above it will retrieve the following:
table_name schema_name column_name
CAM10000 dbo VCHRNMBR
CAM10100 dbo VCHRNMBR
CAM30000 dbo VCHRNMBR
CAM30100 dbo VCHRNMBR
MC020103 dbo VCHRNMBR
MC020105 dbo VCHRNMBR
PA50100 dbo VCHRNMBR
PA50103 dbo VCHRNMBR
PA50105 dbo VCHRNMBR
PM10000 dbo VCHNUMWK
PM10000 dbo VCHRNMBR
PM10100 dbo VCHRNMBR
PM10200 dbo VCHRNMBR
PM10201 dbo VCHRNMBR
PM10300 dbo VCHRNMBR
PM10400 dbo VCHRNMBR
PM10500 dbo VCHRNMBR
PM10600 dbo VCHRNMBR
PM10801 dbo VCHRNMBR
PM10900 dbo VCHRNMBR
PM10901 dbo VCHRNMBR
PM10902 dbo VCHRNMBR
PM20000 dbo VCHRNMBR
PM20100 dbo VCHRNMBR
PM20200 dbo VCHRNMBR
PM20401 dbo VCHRNMBR
PM30200 dbo VCHRNMBR
PM30300 dbo VCHRNMBR
PM30600 dbo VCHRNMBR
PM30700 dbo VCHRNMBR
PM30800 dbo VCHRNMBR
PM50100 dbo VCHRNMBR
PM50503 dbo VCHRNMBR
PM50504 dbo VCHRNMBR
PM80200 dbo VCHRNMBR
PM80300 dbo VCHRNMBR
PM80500 dbo VCHRNMBR
PM80600 dbo VCHRNMBR
PM80700 dbo VCHRNMBR
PM80800 dbo VCHRNMBR
PM80900 dbo VCHRNMBR
PM80905 dbo VCHRNMBR
POP10300 dbo VCHRNMBR
POP30300 dbo VCHRNMBR
PP000100 dbo VCHRNMBR
PP000101 dbo VCHRNMBR
PP100100 dbo VCHRNMBR
PP100101 dbo VCHRNMBR
SVC00203 dbo VCHRNMBR
SVC05600 dbo VCHNUMWK
SVC05601 dbo VCHNUMWK
SVC30203 dbo VCHRNMBR
SVC35600 dbo VCHNUMWK
SVC35601 dbo VCHNUMWK
As shown above, CAM is for the control account management module, POP for the purchase order processing module, SVC for the service module, PP for the revenue and expense deferral ...etc. Additionally, the PM tables retrieved are not limited to the transaction table, but some setup table and master tables as well.
This is just a quick note for you to consider.
Please never hesitate to share any further inquiries,