Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6243621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:10:28+00:00 2026-05-24T12:10:28+00:00

When attempting to validate a journal I use the LedgerJournalEngine ErrorExists for each voucher

  • 0

When attempting to validate a journal I use the LedgerJournalEngine ErrorExists for each voucher in the journal. For some reason it doesn’t catch all errors in the code but if I use the validate button in the client the errors are in the info log.

Is there a better way to validate a voucher in a journal?

changecompany(ledgerJournalTable.dataAreaId)
{
    ledgerJournalCheckPost = LedgerJournalCheckPost::newLedgerJournalTable(ledgerJournalTable,NoYes::Yes,NoYes::No);
    lje = LedgerJournalEngine::construct(ledgerJournalTable.JournalType);
    lje.newJournalActive(ledgerJournalTable,true);
    ledgerJournalCheckPost.parmLedgerJournalEngine(lje);
    try
    {
        ledgerJournalCheckPost.run();
    }
    catch
    {
        ledgerJournalCheckPost.validate();
        while select ledgerJournalTrans where ledgerJournalTrans.JournalNum == ledgerJournalTable.JournalNum
        {
            if(lje.errorExists(ledgerJournalTrans.Voucher))
            {
                errors.addError(lje.errorLog(ledgerJournalTrans.Voucher),ledgerJournalTrans.RecId);
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:10:29+00:00Added an answer on May 24, 2026 at 12:10 pm

    So this is what I have come up with, so far it seems to be working as expected. If anyone has a better way please let me know.

    changecompany(ledgerJournalTable.dataAreaId)
    {
        ledgerJournalCheckPost = LedgerJournalCheckPost::newLedgerJournalTable(ledgerJournalTable,NoYes::No);
        lje = LedgerJournalEngine::construct(ledgerJournalTable.JournalType);
        lje.newJournalActive(ledgerJournalTable,true);
        ledgerJournalCheckPost.parmLedgerJournalEngine(lje);
        try
        {
            ledgerJournalCheckPost.run();
            while select ledgerJournalTrans where ledgerJournalTrans.JournalNum == ledgerJournalTable.JournalNum
            {
                if(lje.errorInJournal() || ledgerJournalCheckPost.numOfErrorsInList()>0)
                {
                    errors.addError(lje.errorLog(ledgerJournalTrans.Voucher),ledgerJournalTrans.RecId);
                }
            }
            ledgerJournalCheckPost.parmPost(NoYes::Yes);
            ledgerJournalCheckPost.run();
        }
        catch
        {
            ledgerJournalCheckPost.validate();
            while select ledgerJournalTrans where ledgerJournalTrans.JournalNum == ledgerJournalTable.JournalNum
            {
                if(lje.errorInJournal() || ledgerJournalCheckPost.numOfErrorsInList()>0)
                {
                    errors.addError(lje.errorLog(ledgerJournalTrans.Voucher),ledgerJournalTrans.RecId);
                }
            }
        }
        ledgerJournalCheckPost = null;
        lje = null;
        ledgerJournalTrans = null;
        ledgerJOurnalTable = null;
    }
    return errors;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to use filter_input_array() to validate some post data. Despite my best efforts
I am attempting to use Ant's XMLValidate task to validate an XML document against
I'm attempting to use 'jQuery Validate' on a form that requires an email address
I was attempting to validate my page and was having some issues with the
Based on the answer provided here , I am attempting to validate whether or
Attempting to use the data series from this example no longer passes the JSONLint
Attempting to use XStream's JavaBeanConverter and running into an issue. Most likely I'm missng
I am attempting to validate my object that encapsulates a list of other objects,
I am attempting to validate that the input into a textbox on a C#
I am trying to use validatevalue:forkey: method to validate a coredata property. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.