web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to add field in custinvoicetrans table from general journal account entry table while posting the sales invoice in ax 2012

(0) ShareShare
ReportReport
Posted on by 632

Hello friends,

I have created one customized field in "CustInvoiceTrans" table and want to insert record from "GeneralJournalAccountentry" table to  "CustInvoiceTrans" table while posting the sales invoice if posting type  "Withholding tax".

Please let me know how to insert  field in "CustInvoiceTrans" table from "GeneralJournalAccountentry" table while posting the sales invoice.

Thanks & Regards

Rahul

I have the same question (0)
  • WillWU Profile Picture
    22,363 on at

    Hi Rahul.p,

    Please try to put your codes in the postCustVend method of SalesInvoiceJournalPost class.

    Also see:docs.microsoft.com/.../gg805894(v=ax.60)

  • Rahul.p Profile Picture
    632 on at

    Debugger is not hitting in the postCustVend method of SalesInvoiceJournalPost class.

    I have checked debugger configuration working fine.

    I have created one test job with debugger it's hitting in the job.

    debugger is hitting only in the main method of  SalesFormLetter class but in the postCustVend method of SalesInvoiceJournalPost class not hitting

  • WillWU Profile Picture
    22,363 on at

    Hi Rahul.p,

    Here is the call stacks made during the sales order invoice process.

    CustInvoiceJour:

    [s]    \Data Dictionary\Tables\CustInvoiceJour\Methods\insert                                                  1

    [s]    \Classes\SalesInvoiceJournalCreateBase\createJournalHeader                                             62

    [s]    \Classes\SalesInvoiceJournalCreate\createJournalHeader                                                  8

    [s]    \Classes\FormletterJournalCreate\createJournal                                                         18

    [s]    \Classes\FormletterJournalCreate\run                                                                    6

    [s]    \Classes\SalesInvoiceJournalCreate\run                                                                 10

    [s]    \Classes\FormletterService\createJournal                                                               29

    [s]    \Classes\FormletterService\run                                                                         77

    [s]    \Classes\FormletterService\postSalesOrderInvoice                                                       14

    [s]    \Classes\DictClass\callObject                                                                            

    [s]    \Classes\SysOperationServiceController\runOperation                                                    93

    [s]    \Classes\SysOperationServiceController\runServiceOperation                                             22

    [s]    \Classes\DictClass\callStatic                                                                            

    [s]    \Classes\SysDictClass\invokeStaticMethod                                                               26

    [s]    \Classes\SysDictClass\invokeStaticMethodIL                                                             39

    [s]    \Classes\SysOperationRPCFrameworkService\runServiceOperation                                            5

    [c]    \Classes\SysOperationServiceController\runOperationWithRunAs                                            7

    [c]    \Classes\SysOperationServiceController\run                                                             22

    [c]    \Classes\FormLetterServiceController\run                                                                3

    [c]    \Classes\SalesFormLetter\run                                                                           77

    [c]    \Classes\SalesFormLetter_Invoice\run                                                                    6

    [c]    \Classes\SalesFormLetter\main                                                                         100

    [c]    \Classes\FormFunctionButtonControl\Clicked                                                              

    GeneralJournalEntry:

    [s]    \Data Dictionary\Tables\GeneralJournalEntry\Methods\Insert                                              1

    [s]    \Classes\RecordSortedList\insertDatabase                                                                

    [s]    \Classes\LedgerPostingGeneralJournalController\transferReferences                                      48

    [s]    \Classes\LedgerPostingGeneralJournalController\transfer                                                11

    [s]    \Classes\LedgerVoucher\post                                                                            92

    [s]    \Classes\LedgerVoucherPost\end                                                                         10

    [s]    \Classes\FormletterJournalPost\endLedgerVoucher                                                         6

    [s]    \Classes\SalesInvoiceJournalPostBase\endLedgerVoucher                                                  18

    [s]    \Classes\SalesInvoiceJournalPost\endLedgerVoucher                                                      16

    [s]    \Classes\FormletterJournalPost\post                                                                   256

    [s]    \Classes\FormletterJournalPost\run                                                                     11

    [s]    \Classes\SalesInvoiceJournalPostBase\run                                                                6

    [s]    \Classes\SalesInvoiceJournalPost\run                                                                   30

    [s]    \Classes\FormletterService\postJournal                                                                 42

    [s]    \Classes\FormletterService\run                                                                         80

    [s]    \Classes\FormletterService\postSalesOrderInvoice                                                       14

    [s]    \Classes\DictClass\callObject                                                                            

    [s]    \Classes\SysOperationServiceController\runOperation                                                    93

    [s]    \Classes\SysOperationServiceController\runServiceOperation                                             22

    [s]    \Classes\DictClass\callStatic                                                                            

    [s]    \Classes\SysDictClass\invokeStaticMethod                                                               26

    [s]    \Classes\SysDictClass\invokeStaticMethodIL                                                             39

    [s]    \Classes\SysOperationRPCFrameworkService\runServiceOperation                                            5

    [c]    \Classes\SysOperationServiceController\runOperationWithRunAs                                            7

    [c]    \Classes\SysOperationServiceController\run                                                             22

    [c]    \Classes\FormLetterServiceController\run                                                                3

    [c]    \Classes\SalesFormLetter\run                                                                           77

    [c]    \Classes\SalesFormLetter_Invoice\run                                                                    6

    [c]    \Classes\SalesFormLetter\main                                                                         100

    [c]    \Classes\FormFunctionButtonControl\Clicked                                                              

    [c]    \Forms\SalesTable\Designs\DesignList\buttonUpdateInvoice\Methods\Clicked                                9

    GeneralJournalAccountEntry:

    [s]    \Data Dictionary\Tables\GeneralJournalAccountEntry\Methods\Insert                                      10

    [s]    \Classes\RecordSortedList\insertDatabase                                                                

    [s]    \Classes\LedgerPostingGeneralJournalController\transferLines                                          103

    [s]    \Classes\LedgerPostingGeneralJournalController\transferReferences                                     125

    [s]    \Classes\LedgerPostingGeneralJournalController\transfer                                                11

    [s]    \Classes\LedgerVoucher\post                                                                            92

    [s]    \Classes\LedgerVoucherPost\end                                                                         10

    [s]    \Classes\FormletterJournalPost\endLedgerVoucher                                                         6

    [s]    \Classes\SalesInvoiceJournalPostBase\endLedgerVoucher                                                  18

    [s]    \Classes\SalesInvoiceJournalPost\endLedgerVoucher                                                      16

    [s]    \Classes\FormletterJournalPost\post                                                                   256

    [s]    \Classes\FormletterJournalPost\run                                                                     11

    [s]    \Classes\SalesInvoiceJournalPostBase\run                                                                6

    [s]    \Classes\SalesInvoiceJournalPost\run                                                                   30

    [s]    \Classes\FormletterService\postJournal                                                                 42

    [s]    \Classes\FormletterService\run                                                                         80

    [s]    \Classes\FormletterService\postSalesOrderInvoice                                                       14

    [s]    \Classes\DictClass\callObject                                                                            

    [s]    \Classes\SysOperationServiceController\runOperation                                                    93

    [s]    \Classes\SysOperationServiceController\runServiceOperation                                             22

    [s]    \Classes\DictClass\callStatic                                                                            

    [s]    \Classes\SysDictClass\invokeStaticMethod                                                               26

    [s]    \Classes\SysDictClass\invokeStaticMethodIL                                                             39

    [s]    \Classes\SysOperationRPCFrameworkService\runServiceOperation                                            5

    [c]    \Classes\SysOperationServiceController\runOperationWithRunAs                                            7

    [c]    \Classes\SysOperationServiceController\run                                                             22

    [c]    \Classes\FormLetterServiceController\run                                                                3

    [c]    \Classes\SalesFormLetter\run                                                                           77

    [c]    \Classes\SalesFormLetter_Invoice\run                                                                    6

    [c]    \Classes\SalesFormLetter\main                                                                         100

    [c]    \Classes\FormFunctionButtonControl\Clicked                                                              

    [c]    \Forms\SalesTable\Designs\DesignList\buttonUpdateInvoice\Methods\Clicked                                9

  • Rahul.p Profile Picture
    632 on at

    I have kept the call stacks in some classes of CustInvoiceJour and GeneralJournalAccountEntry but call stacks is showing only SalesFormLetter\main and \run method.

    Doses i have to put call stacks in all there classes, tables and forms?

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi Rahul.p,

    GL postings are happening in CustVendVoucher.post (CustVoucher is an extended class for the customer transaction) method. Maybe you can try to put a breakpoint there and see it helps you to solve your issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 669

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 445 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans