This is NAV 2015.
My dev problem is this: From a given Posted Sales Invoice line, find any/all Posted Sales Credit Memo lines associated with that invoice line.
I've hunted through a whole jungle of tables/recs to find a foolproof path from one to the other and I just don't see one. I would have thought there would be "pointer" fields in the credit memo line to specify the original invoice line, or some "Applies To" field in customer or item ledger entry, but no joy. (Well - I think it was in ILE I saw an Applies to Entry" field, but it was always blank.)
Short of adding these pointer fields to the Cr Memo myself, does anyone have any guidance/experience, etc. ?
Thanks in advance!
0
Comments
For Accounts Receivable, the relation is to the Customer Ledger Entry (Posted Sales Invoice Header) to which the credit memo is applied.
For inventory, this would be the Item Ledger Entry from which the posted credit memo line will get its cost. This can be set by the system based on the costing method or by the user by using the "Applies to" field on the credit memo line.
I really don't know what the "point of view" is. It's just a requirement from a customer to export Posted Sales Invoice info NET OF credit memo returns. All to satisfy some legacy process. I don't know why - and it's not my business. (Above my pay-grade. :-))
But I can't find any useful info in the cr memo line though. If there is an "Applies To" (can't remember - my head is spinning badly) it is empty - but I'll go back and check.
But to boil it down to the user's perspective - "For this Posted Sales Invoice, what (Item/Qty/Lot) did the user reject/return/not receive and we issued a credit memo for?" Seems like a reasonable question, eh? And you would think (!) the "Navigate" action on the Posted Sales Invoice page might include an option like that. You would think ...
You will need to find the "Item Ledger Entry" records related to you posted document lines. Then find the related "Item Application Entry" records and link them together.
From my autopsying their data, they are not doing whatever is required to establish the link(s) needed. It's ok. My search is pretty-good now that I added a check to ensure the item-tracking in the credit memo lines up with that in the invoice. (It was fun!)
If the customer can be shown the process where the links are there then I'll switch to that search method. I don't know that process, but others in our company probably do. (I'm the mechanic - not the driver.)
Thanks again!