web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Linking a packing slip to invoice. Why does it only work if your country region code is IN

(0) ShareShare
ReportReport
Posted on by 1,871

AX 2012 R2 - USA

Recently I started on a project that requires me to link an invoice to what packing slip it came from which also allows us to know what shipment it was associated with. I noticed that on the packing slip transaction table (CustPackingSlipTrans) there is a field called InvoiceTransRefRecId which has a relationship to invoice transactions (CustInvoiceTrans.RecId) however this field only seems to be populated if the field CustParmaters.MatchedPackingSlipInquiry is checked which is displayed on the form Accounts receivable>Accounts receivable parameters (CustParameters)

newcode.PNG

however the field is never displayed under the updates tab which could allow you to check it. But then I noticed on the custparmaters table the field had a country code of IN (I'm guessing India) so I removed the country code and the field now shows on the parms form. However this field (CustPackingSlipTrans.InvoiceTransRefRecId) gets populated via the class SalesInvoiceJournalCreate.endCreate() but there is another check to only execute the code if the country region code is IN.

My question is why would you only ever want to keep track of what packing slip an invoice came from if you are in India? I understand creating the India transaction if you are in India but why not keep track of invoice --> packing slip at all times? Can anyone shed some light into this and why you wouldn't do the following or why AX doesn't do the following(shown below)? Is this just something that MS overlooked ?

*This post is locked for comments

I have the same question (0)
  • kpprokop Profile Picture
    on at

    Adam, did you ever get an answer to this question?  I have the same issue and I'm dead in the water.  I have a shipment report where the user wants to see the invoice # on each line that shipped, but THERE IS NO LINK between packing slip and invoice and I'm getting duplicates using inventtransid.  The InvoiceTransRefRecId is 0 in all my custpackingslip trans records (because I'm not in India evidently), and the CustInvoicePackingSlipQuantityMatch table is useless.  ANY suggestions would be greatly appreciated!  Thank you!

  • adam260 Profile Picture
    1,871 on at

    Unfortunately I never did get any reply's on this one and I am currently working on a different project where I do not have access to the same code base. However just from reading the post I believe I just modified the code to always log this information as shown in image 2.

  • kpprokop Profile Picture
    on at

    Thanks for responding Adam.  I appreciate the feedback!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans