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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Call method while creating invoice in Sales Order

(0) ShareShare
ReportReport
Posted on by 770

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

I have the same question (0)
  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at
    RE: Call method while creating invoice in Sales Order

    I am not sure what exactly you want to do here. But I suppose you want a starting point for Sales Invoice? If that is the case then you can look at the SalesFormLetter_invoice class.

  • MUHAMMAD HAARIS Profile Picture
    770 on at
    RE: Call method while creating invoice in Sales Order

    Hi Vinit,

    I want to maintain invoice details of Sales order's invoice in new table.

    In which place i have to write coding to insert in new table?

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at
    RE: Call method while creating invoice in Sales Order

    You can add your code at the end of SalesinvoiceJournalPost-> postJournalPost method

  • MUHAMMAD HAARIS Profile Picture
    770 on at
    RE: Call method while creating invoice in Sales Order

    Hi All/ Vinit,

    i have added my code at the end of SalesinvoiceJournalPost-> postJournalPost method.. But not affected... Even-though debugger also not reached that code.

    Is there any other ideas?

  • vinitgoyal2005 Profile Picture
    6,332 on at
    RE: Call method while creating invoice in Sales Order

    what version you are working on? other thing, did you generate CIL?

  • MUHAMMAD HAARIS Profile Picture
    770 on at
    RE: Call method while creating invoice in Sales Order

    Ax 2012, Why Generate CIL needed?

  • vinitgoyal2005 Profile Picture
    6,332 on at
    RE: Call method while creating invoice in Sales Order

    read this post : community.dynamics.com/.../ax-2012-cil-how-does-it-work

  • MUHAMMAD HAARIS Profile Picture
    770 on at
    RE: Call method while creating invoice in Sales Order

    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.

  • Sohaib Cheema Profile Picture
    49,434 User Group Leader on at
    RE: Call method while creating invoice in Sales Order

    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)

  • MUHAMMAD HAARIS Profile Picture
    770 on at
    RE: Call method while creating invoice in Sales Order

    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);

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans