Item Ledger Entry relation to Line No.
anil_mujagic
Member Posts: 91
Hi,
For each Item Ledger Entry No. of type Sale I have to find the related line in sales document.
I found the field "Item Shpt. Entry No." in "Sales Shipment Line" table, and I also found the "Item Entry Relation" table.
That covers sales invoices. But, I couldn't find the way to relate Item Ledger Entry No. to "Sales Cr.Memo Line" or "Posted Service Invoice Line".
Does anyone know is there a way to find a relation?
NAV 4.0 SP3
For each Item Ledger Entry No. of type Sale I have to find the related line in sales document.
I found the field "Item Shpt. Entry No." in "Sales Shipment Line" table, and I also found the "Item Entry Relation" table.
That covers sales invoices. But, I couldn't find the way to relate Item Ledger Entry No. to "Sales Cr.Memo Line" or "Posted Service Invoice Line".
Does anyone know is there a way to find a relation?
NAV 4.0 SP3
Try my NAV Object Comparer: http://www.mibuso.com/dlinfo.asp?FileID=1041
0
Comments
-
Hello,
There is a "Document No." column in both tables does this work for you?
I just tried it myself in SQL but the return is taking a bit of time.0 -
I know there is a "Document No." field, but my question was about Line No. in that document.lduddridge wrote:Hello,
There is a "Document No." column in both tables does this work for you?
I just tried it myself in SQL but the return is taking a bit of time.Try my NAV Object Comparer: http://www.mibuso.com/dlinfo.asp?FileID=10410 -
Try using the "Entry No." on the Item Ledger Entry.
I believe this lines up with the Ship Entry No you were talking about earlier.0 -
Sorry to ask you this, but did you read my post entirely? I know that you want to help but, you are telling me something that I already explained in my post.lduddridge wrote:Try using the "Entry No." on the Item Ledger Entry.
I believe this lines up with the Ship Entry No you were talking about earlier.
Does anyone else of you guys has some suggestion?Try my NAV Object Comparer: http://www.mibuso.com/dlinfo.asp?FileID=10410 -
NOOOOOO! I am sooooooooo sorry dude.
I think I got a bit selective about what I read!0 -
can you use item number? or do you have a chance of having more than one line of the same item in the same document number?0
-
No problemlduddridge wrote:NOOOOOO! I am sooooooooo sorry dude.
I think I got a bit selective about what I read!
, but i still need a solution... anyone please? Try my NAV Object Comparer: http://www.mibuso.com/dlinfo.asp?FileID=10410 -
Actually that is the problem. I have situations where there are two lines with same Item No. but with different discount, and I need to know that discount in related Item Ledger Entry.lduddridge wrote:can you use item number? or do you have a chance of having more than one line of the same item in the same document number?Try my NAV Object Comparer: http://www.mibuso.com/dlinfo.asp?FileID=10410 -
Well, if there were different discounts then there would be different end sales amount, so can't you tie to the value entry table, have it validate item number, quantity, and sales amount actual to the Sales Cr. Memo Line table and then have it pull the line number off that second table?
Otherwise, you can do it if you are using Specific Costing based on the Applies-to Entry field.
Those are the only solutions I can offer you, hope it helps.0 -
anil_mujagic wrote:Hi,
For each Item Ledger Entry No. of type Sale I have to find the related line in sales document.
I found the field "Item Shpt. Entry No." in "Sales Shipment Line" table, and I also found the "Item Entry Relation" table.
That covers sales invoices. But, I couldn't find the way to relate Item Ledger Entry No. to "Sales Cr.Memo Line" or "Posted Service Invoice Line".
Does anyone know is there a way to find a relation?
NAV 4.0 SP3
You will need to find the related Value Entry, then look up to the Item Ledger entry from there.
The reason why it's designed like this is because it's a many to one relationship. i.e. One ILE can have many value entries and sales invoices/credit memos.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I temporary solved the problem by grouping item ledger entry by Item No.
I lost the detailed info but it turned out that it is not so important here.
For each entry I find (through first record in value entry) the document no., and in document line I calculate sum of discount amount, and sum of quantity for that item. Then I divide total amount by total quantity and I get average discount by item in that document, and then multiply that amount by quantity from item ledger entry.
This way I will not get exact discount amount for each item ledger entry, but as long as discount amount is totaled by item, I don't care. If client turns to insist on details, you will see this post active again
In the mean time thank you for your suggestions guys!Try my NAV Object Comparer: http://www.mibuso.com/dlinfo.asp?FileID=10410
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions