Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

how change for the default open for planning status in Job

(0) ShareShare
ReportReport
Posted on by 355

Hi community,

I have a question, when I create a new Job, I want use planning for the default and not open job.

could you help me, how i can modify in AL Code?.

Thank you, I will appreciate

pastedimage1678987953811v1.png

I tried to use a trigger, but still does not work

trigger Onnewrecord()
    begin
        Status := Status::Planning;
    end;

  • Verified answer
    Manuel Lozada Profile Picture
    Manuel Lozada 355 on at
    RE: how change for the default open for planning status in Job

    Inge M. Bruvik

    Thank you, this is other way to do it. I appreciated

  • Manuel Lozada Profile Picture
    Manuel Lozada 355 on at
    RE: how change for the default open for planning status in Job

    YUN ZHU

    Thank you for helping me, now works perfect

  • Suggested answer
    Ben Baxter Profile Picture
    Ben Baxter 5,275 Super User 2025 Season 1 on at
    RE: how change for the default open for planning status in Job

    Rather than hard coding the status, it is better to add a field to the Job Setup table for "Default Job Status".  This way if you needed it to be something different in the future it wouldn't take a developer to change it.  As a non-developer, I can't stand hardcoded development.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 78,032 Super User 2025 Season 1 on at
    RE: how change for the default open for planning status in Job

    Hi, If you only want to run in Job Card, you can try the code below.

    pastedimage1679016891429v1.png

    pastedimage1679016899849v2.png

    But please note whether to use the Validate method, and the code of the Modify trigger needs to be run.

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 997 Moderator on at
    RE: how change for the default open for planning status in Job

    You can try to use this even on the Job table:

    local procedure OnAfterOnInsert(var Job: Record Job; var xJob: Record Job)

       begin

       end;

    And set the status there.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February 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... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans