Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codeunit 6620 "Copy Document Mgt." *Data* Expose Request #206

Closed
rdebath opened this issue Jun 7, 2018 · 1 comment
Closed

Codeunit 6620 "Copy Document Mgt." *Data* Expose Request #206

rdebath opened this issue Jun 7, 2018 · 1 comment

Comments

@rdebath
Copy link

rdebath commented Jun 7, 2018

I have a Posted sales invoice that is being used to create a Credit Memo.
I have other tables where I wish to record the fact that the Credit memo has been created.
These tables may have several records for each sales invoice line and I need to relate these lines to the corresponding line or lines in the Credit memo.
For the trivial case the Sales line line numbers may match the credit memo but not generally.

Currently I have several inserts in the codeunit that record the line numbers used when the sales invoice lines are copied to the temp table. For other locations in the codeunit I forbid (TESTFIELD) copying of sales invoice lines that are related to my additional tables. When the credit memo lines are actually created I use the temp table line numbers to link the created credit memo lines to the posted sales invoice lines that they came from.

The standard code seems to overload the "Shipment No." and "Return Receipt Line No." fields to store this information "sometimes" eg: FromSalesInvLine.GET("Shipment No.","Return Receipt Line No.");, but the fields appear to be cleared by the time the "OnBeforeInsertToSalesLine" and "OnAfterInsertToSalesLine" (v13.0.22490) triggers are called.

My preference would be for a temp "Line Number Buffer" with all the relationships to be provided on the InsertToSalesLine triggers so I can make simple (eg: is it one-to-one) or complex (eg: pick a line if they're "compatible") decisions on how to handle the various possibilities. NB: Without all the detail I probably won't be able to trap all the error states to give reasonable errors.

@StanislawStempin StanislawStempin transferred this issue from microsoft/AL Nov 1, 2018
@JesperSchulz
Copy link
Contributor

Sounds like you are requesting an improved linking between Sales Invoices and Credit Memos. Could you post that idea to http://aka.ms/bcideas with all necessary details? Sounds like all BC users could benefit from that improvement, rather than enabling extensibility for you to solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants