Announcements
Dear All,
I want to insert some data related to invoice while creation invoice in Sales Order form.
Which place is exact to call my method to insert in my method?
Required filed to insert are invoice id, invoice date, Voucher & invoice amount, sales id, cust accout.
Thanks in advance.
*This post is locked for comments
code in SalesFormLetter class's main() method
there is code like "if (salesFormLetter.prompt())
{
salesFormLetter.run(); ......
after that if condition can insert data
don't forget to check "parmEnum == DocumentStatus::Invoice" condition
can get CustInvoiceJour table from "CustInvoiceJour = outputContract.parmJournal();"
You must try event handler on sales invoice table.
You can only debug the code when you remove the checkbox 'Execute business operations in CIL' in your user options.
Also it's possible that the journal is created with a recordInsertList in which case the insert method is not called I believe.
Ya... Debugger is working in Sales Order's invoice process. But My coding in insert(method) of CustInvoiceJour(Table) is not working. i.e I thing It may not reached mentioned method in Sales Order's invoice process.
you need to make sure 2 points to make debugging usable
1) generate incremental CIL
2) Enable breakpoints and debugging globally on server configuration
Thanks Mr. Sohaib.
I already tried in insert(method) of CustInvoiceJour(Table). But its not affected my custom table and the debugger also not yet reached insert(method) of CustInvoiceJour(Table);
I can see difficulty you are getting while working with classes.
you may choose another, relatively simple way.
you can make use of insert(method) of CustInvoiceJour(Table); As all your required fields land in same table, so, as the record is inserted here i.e. by end of insert method or after super() write your code to insert data in your custom table by taking it form origin(CustInvoiceJour)
Ok Thanks Vinit.
I generated CIL. But Debugger not reached to SalesinvoiceJournalPost-> postJournalPost method.. I want to insert Sales invoice details in my new talbe when the invoice is created. So I need to add my code at end of the Invoice process.
SalesinvoiceJournalPost-> postJournalPost method - Not working.
is there any other idea?
Thanks in Advance.
read this post : community.dynamics.com/.../ax-2012-cil-how-does-it-work
Ax 2012, Why Generate CIL needed?
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator