Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Global Application Class Variable is null

Posted on by 40

Created an AX 2012 R3 project (below) that utilizes Print Management functionality to email an individualized Payment Advice to each vendor within a journal batch.

pastedimage1615903378547v2.png

After the initial testing in our dev environment the code was moved UAT where it passed user testing.  Next additional acceptance testing criteria passed in Production Staging, and finally the code was deployed Production.  However, it failed to calculate a payment amount for the Info box message, Control report and the Payment Advice report. 

The initial debug run revealed an interesting result.  At the first breakpoint the Global Variable APPL appears uninstantiated?

pastedimage1615903446136v3.png

This is not the case in all three previous environments Dev, UAT, and Staging.  The Production environment is different only that it has three AOS’s.  Could this be contributing to the problem?  How and where (server or client) can the APPL  be initialized. 

                                    pastedimage1615903489987v4.png

I much appreciate any help on this issue.

Thanks to all.

Rodney

  • blujay712 Profile Picture
    blujay712 40 on at
    RE: Global Application Class Variable is null

    Hi Martin,

    Thanks for the quick response.  I will follow your suggestion and focus on the calculation. Also, I stand corrected on my wrong title.  Thank you very much again.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: Global Application Class Variable is null

    Appl is intialized automatically and it's always on server. The fact that the debugger doesn't show you its fields doesn't mean that the object isn't initialized. If it failed to initialize, the environment stop working very quickly. Therefore I think it's just about how debugger shows you the data and there is no problem with appl itself.

    I think you should let it be that and focus on your calculation instead.

    By the way, the title is wrong - the debugger doesn't show that the value is null.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans