Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Error - The value "" can't be evaluated into type Boolean.

(0) ShareShare
ReportReport
Posted on by 336

Hi all,

We are getting an error when we run the job queue. the error we get is "The value "" can't be evaluated into type Boolean".

Does anyone know how to resolve this issue. 

pastedimage1677260553654v1.png

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,698 Super User 2024 Season 2 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    Another simple way, you can add a button on a page, this button executes the Codeunit or Report set in the Job queue.

    Then I think you can use debug.

    PS: This problem has been solved in BC, the button below has been added.

    pastedimage1677540597498v1.png

    Hope this helps as well.

    Thanks.

    ZHU

  • Verified answer
    Greg Enns Profile Picture
    Greg Enns 1,102 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    Sorry...just realized you are in NAV--not BC.

    For NAV, you CAN debug a Job Queue Entry, it's just a little trickier. Easiest thing to do would be to have your developer debug his own user session, and then run the desired object (codeunit or report) from the development environment.

    If you must debug the Job Queue when it runs at the system-scheduled time, then it's best to put a delay in the Job Queue like this...

    locaprocedure OnBeforeRunJobQueueEntry(var JobQueueEntry: Record "Job Queue Entry"; var Skip: Boolean)
        begin
            Sleep(10000); //to allow Session to show and be debugged
        end

    Then when the Job Queue is about to start, you refresh your "User Sessions" window repeatedly until you see the new session popup. Click debug, and you're off.

  • Greg Enns Profile Picture
    Greg Enns 1,102 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    You can debug a specific job queue entry by:

    1. Starting the debugger,
    2. Opening the Job Queue Entries list.
    3. Click on the action button "Run once (foreground)".
  • Hatimali84 Profile Picture
    Hatimali84 336 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    For some reason, the debugger was not capturing the job queue. 

    our developer was able to look into the code but still the issue is not resolved. 

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,698 Super User 2024 Season 2 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    Hi, just adding some info.

    It seems to be related to the method below.

    System.Evaluate(var Any, Text [, Integer]) Method

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-evaluate-method

    pastedimage1677455402477v1.png

    Hope it can give you some hints.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    Then there is a bug in the report or codeunit you are trying to run in the jobqueue.

    You should have your developer debug the code.

    Apparently the code is trying to convert an empty string into a Boolean value and that does not work very well.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Error - The value "" can't be evaluated into type Boolean.

    Are you able to run the same process manually?

    If you get same error manually then debug the error and solve it.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans