Invoice Posting

can any one help me to find the function which insert record into GeneralJournalAccountEntry table while posting an Invoice

any help would be helpful

This is handled by the ledgerVoucher\Post class

\Classes\LedgerPostingGeneralJournalController\transfer

Override the insert method in GeneralJournalAccountEntry table, place a break point and see the code flow.

Don’t forget to delete the insert method after your investigation.

thanks for response … it was really helpful. I placed breakpoint in that function but it didn’t reach there. how to find from which method this function is called any tips to find this ?

The invoice posting code will be executing on IL, either debug it in visual studio or un-check Execute business logic in CIL to debug the IL code using X++ debugger (In Tools → options → Development). After your investigation enable this again.

Thanks , I did that … but still its not going inside the function … is there any other things I need to enable???

Thanks

Hillary

Have you placed the breakpoint in insert method?

void clicked()
{
super();

if(callerForm != null &&
formHasMethod(callerForm, ‘postInvoice’) && formHasMethod(callerForm, ‘setPrintVariables’))
{
//
callerForm.setPrintVariables(printInvoice.checked(),
printOut.selection(),
usePrintManagement.checked(),
printSalesFormLetter.checked(),
euVat.checked(),
printFacture_RU.checked(),
printAcceptance_RU.checked(),
printInventBailee_RU.checked());
//
callerForm.postInvoice();
}

element.closeOk();
}

This is the function in the post button click event. I placed break point in the beginning of this function to track at which point "\Classes\LedgerPostingGeneralJournalController\transfer " is called , insert record to GeneralJournalAccountEntry, so that I can pass my additional field at that point to insert in “GeneralJournalAccountEntry”.

The actual requirement is I am trying to customize for making an Consignment Purchase…