AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
Joining from GLTran...
 
Notifications
Clear all

Questions Joining from GLTran to INTran

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by GraemeLM 1 year ago
3 Posts
2 Users
0 Reactions
2,785 Views
RSS
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
Topic starter
March 15, 2021 3:29 am
(@timrodman)
Famed Member
Joined: 10 years ago

Joins can be tricky. In general, whenever you are joining from one table to another, you want to join on the primary keys in the second table. Here's an example where that doesn't work for some reason.

ย 

Before we go into the join between GLTran and INTran, let's talk about the "why".

ย 

Let's say that we are looking at this journal entry on the Journal Transactions (GL301000) screen:

image

ย 

If we click the VIEW SOURCE DOCUMENT button, to see where the journal entry came from, we'll see in this case that it came from the Receipts (IN301000) screen:

image

ย 

If we use Inspect Element (click here) on the Journal Transactions (GL301000) screen, we can see that the lines of the journal entry are stored in the GLTran Data Access Class (DAC).

If we use Inspect Element (click here) on the Receipts (IN301000) screen, we can see that the lines of the inventory transaction are stored in the INTran Data Access Class (DAC).

ย 

GLTran has some information about the inventory transaction, like the Item, but maybe we want to know the Warehouse Location which can only be found in INTran.

That's where we need to join from GLTran to INTran.

ย 

We know that the relationship must exist because pressing the VIEW SOURCE DOCUMENT button takes us from the journal entry to the inventory transaction.

ย 

Back to that "in general" rule from the beginning, we should find the primary keys for INTran which we can do using the Source Code (SM204570) screen which shows us that the primary keys are: DocType, RefNbr, and LineNbr

image

ย 

So, let's try joining from GLTran to INTran. How do we know which fields to use in GLTran? There is probably a better way to do this, but I used a scientific method known as "guessing" to find them. This is the Generic Inquiry that I came up with, including the joins:

image
image
image
image

ย 

The results of the Generic Inquiry look like this with the "IN" fields noticeably empty:

image

ย 

Why didn't this work? Well for some reason (maybe someone can explain why), you have to use INTran.TranType rather than INTran.DocType in the join, even though INTran.TranType is not part of the primary key. Let's fix that in the join:

image

ย 

Ah, now our Generic Inquiry is returning the data that we were expecting:

image

2 Replies
GraemeLM
Posts: 9
 GraemeLM
June 19, 2024 8:04 pm
(@graemelm)
Active Member
Joined: 5 years ago

Hi @timrodman, does this still work for you?
Perhaps since this post things have changed.

On version 23.112.0032 the join above doesn't return the INTran data.
I've seen a few posts online and can see in my instance that GLTran.TranLineNbr doesn't always populate for INTran lines, meaning I can join to the whole GL batch, but not per line (which causes duplication).

Any ideas/recommendations on new ways to join GLTran to INTran at the specific line level?


Reply
GraemeLM
 GraemeLM
(@graemelm)
Joined: 5 years ago

Active Member
Posts: 9
October 16, 2024 8:51 pm
Reply toGraemeLMGraemeLM

Since posting this I've submitted an idea to populate the field always and allow the tables to be joint in all scenarios.
Any votes appreciated as this is quite the gap, and it would be great if it was fixed sooner than later ๐Ÿ™‚ย 

Populate GLTran.TranLineNbr for all INTran


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 293 Online
  • 2,405 Members
Our newest member: Brittany Bartman
Latest Post: Importing Acumatica User Roles / User Security Permissions from Excel
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright ยฉ 2025 ยท AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

โ€นโ€บร—

    โ€นโ€บร—