Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Question about CustPostInvoiceJob form Ax 2009

(0) ShareShare
ReportReport
Posted on by 160

Hello:

We need to customize the form CustPostInvoiceJob.

We created new fields and all is ok.

The changes are for electronic invoice reasons.

But, in this form, we don't have the table CustInvoiceTable.

I know that this form is called from the class of the same name.

In the method main from this class:

    if (custPostInvoiceJob.prompt())

When the above line is executed, it calls the CustPostInvoiceJob form.

How I do to get CustInvoiceTable?.

I tried with the init method in the form but element,args().records do not return anything.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Question about CustPostInvoiceJob form Ax 2009

    Hi José,

    I tried the code and it works. The class instance for CustPostInvoiceJob is already being being called in the init method of CustPostInvoiceJob form. You can run this code after super() call and it should work fine. I have highlighted the changes I made below -

    pastedimage1648157833317v1.png

  • José Quintero Profile Picture
    160 on at
    RE: Question about CustPostInvoiceJob form Ax 2009

    Hello Gunjan!:

    It is a good idea, but as after CustPostInvoiceJob class pass first to RunBase

    (by the prompt() method) before call custPostInvoiceJob form, the

    class CustPostInvoiceJob is empty when arrives to init form method

    and it show me again no record.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Question about CustPostInvoiceJob form Ax 2009

    Hi José,

    You can try this code in the form init method and check if that works for you.

    QueryRun            qrRunLoc;
    CustInvoiceTable    localInvoiceTable;
    
    qrRunLoc = custPostInvoiceJob.queryRun();
    
    while (qrRunLoc.next())
    {
        localInvoiceTable = qrRunLoc.get(tableNum(CustInvoiceTable));
    }

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/forums/thread/details/?threadid=%27nvOpzp;%20AND%201=1%20OR%20(%3C%27%22%3EiKO))," - Too many )'s.