Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Error " Stack trace: The company does not exist " when validating a Journal voucher

(0) ShareShare
ReportReport
Posted on by 14,855

I am getting this error when validating a journal voucher , any idea how to fix it ?

Stack trace: The company  does not exist.

 

Stack trace

 

(S)\Data Dictionary\Tables\LedgerJournalTrans\Methods\validateWrite - line 74

(C)\Classes\FormDataSource\validateWrite

(C)\Forms\LedgerJournalTransDaily\Data Sources\LedgerJournalTrans\Methods\validateWrite

(C)\Classes\FormDataSource\leaveRecord

(C)\Forms\LedgerJournalTransDaily\Data Sources\LedgerJournalTrans\Methods\leaveRecord

*This post is locked for comments

  • Verified answer
    Abdo Khoury Profile Picture
    14,855 on at
    RE: Error " Stack trace: The company does not exist " when validating a Journal voucher

    so far the below got me closer to my issue

    blogs.technet.microsoft.com/.../advance-holder-functionality-not-available-without-finance-ii-license

    i am checked the license General ledger II and synchronizing ,

    i will let you know if it works for not , fingers crossed.

  • Abdo Khoury Profile Picture
    14,855 on at
    RE: Error " Stack trace: The company does not exist " when validating a Journal voucher

    i followed your advice and looked through the code, the issue is on line 74

       if (this.OffsetAccountType != LedgerJournalACType::Ledger)

       {

           changecompany(this.OffsetCompany)

           {

               DimensionValidation::validateDefaultDimension(this.OffsetDefaultDimension);

           }

       }

       return isValid;

    }

    apparently this has to do with the offset company account so i check on the table the field offsetcompany is there but on the form it is not and i can't add it

    could this be the cause ?

    why did this happen , this is a fresh installation with no customization what so ever

    your feedback is appreciated

    thanks

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Error " Stack trace: The company does not exist " when validating a Journal voucher

    Hi,

    Please check whether the method validateWrite of table LedgerJournalTrans has any customization that is causing this problem. If there are no customizations, please perform compilation and CIL once.

  • Suggested answer
    István Orosz Profile Picture
    2,137 on at
    RE: Error " Stack trace: The company does not exist " when validating a Journal voucher

    Hi,

    You have to use debugger to solve it. If you put a breakpoint in that line, can you see if the given transaction has any company value? In the my current environment, there is an operation for the this.company value, if it is empty, that could cause similar problems.

    Regards,

    István

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,125 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,871 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans