Breaking news from around the world
Get the Bing + MSN extension
End of mainstream support for Microsoft Dynamics AX 2009, 2012, and 2012Mainstream support for Dynamics AX 2009 Service Pack 1 (SP1), Dynamics AX 2012, and Dynamics AX 2012 R2 ended Oct. 9, 2018. After that date, only security hotfixes will be provided for these three versions through the extended support period that until Oct. 12, 2021. Read more
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent 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