Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I have added a few fields in purchase line, I want to add the same fields to my purchase invoice form and being able to initialize it with purch line method.
On the face of it , it is as simple as that and ideally initializing field in initfromPurchline should be all required. But then this doesn't work. Even adding fields to purch parm line and adding the code to initialize in Vend document line map doesn't work.
(Someone has really worked hard to make it a mystery !)
So my question is , is there a simple way of achieving what I am trying to do or I need to tricks like writing code on form.
Did you use the debugger to find out if the methods mentioned by you are used or not?
If it des, check if you did an incremental CIL compile..
I checked in debugger as well as cross reference and found that the methods are island.
You have two possibiliy :
1- Create the fields on VendInvoiceTrans table, modify the initFromPurchLine method of the same table and Compile incremental CIL
This method is call by the Vend Invoice posting, from the PurchInvoiceJournalCreate class, createJournalLine method.
2- Create display fields on VendInvoiceTrans table related the Purchline fields that you want to show in the VendInvoiceJournal form and add in the grid.
Take care to handle the cache for performance issue.
Thanks for the response, as suggested I want to show those values on the table as well as let the end user override it if he wants, one way would be to do it through edit method but then it's really a work around. Given it's such a common user scenario, I am wondering why it is so hard to add one field on invoice screen, initialize it with PO value and pass it to journals.
By using the debugger you should be able to find the method used to initialize the Vendor invoice lines. Perhaps you can start with setting the breakpoint on the insert method of the table?
I would not go for the display method option as it is somehow possible to clean up processed purchase orders. Then the data would be unavailable.
You are right about the Display method, but the debugger surprisingly doesn't hit the insert method or any of init methods. Thought it to be a CIL issue but despite having generate full CIL none of the method are getting propelled.
When debugging check if the User option 'Execute business operations in CIL' is disabled in your settings. Open your User Options form. On tab Development you can find this option.
Tried all sorts of thing (Generate full CIL, ON/OFF CIL check box) and only solution (though not convincing) is create EDIT method to initialize from source and subsequently manage it at the target. Given it's PO lines with fewer records so I won't be overtly worried about performance for now. But would like to see a simpler solution for simple problem. Unless we are suggesting that edit or display method is only way to handle this.
Did you figure this out? Please let me know if you did other than edit method.
Add methods to initialize your fields from the VendDocumetnLineMap to the class VendDocumentLineType and call them in the \Classes\VendDocumentLineType\initFromPurchLine method.
I have same issue, but In D365 Map extension is not possible, so how to add custom field on VendDocumetnLineMap
Business Applications communities