Skip to main content

Notifications

Announcements

No record found.

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

How to hide the dimension message.

(0) ShareShare
ReportReport
Posted on by 225
Hi everyone,
 
 Is there any way to hide this message in jobs on Business central. Im updating the header dimension field value via coding while im testing im getting this dimension message. I need to skip this message and the default answer is /Yes/
 
 
 
Thanks in Advance.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 76,221 Super User 2024 Season 2 on at
    How to hide the dimension message.
    Hi, indeed it's a bit troublesome and I'm sorry I didn't fully confirm it.
    You can subscribe to the above event, skip the whole confirmation process, and then modify the dimensions in your code for the lines
    For example,
     
        [EventSubscriber(ObjectType::Table, Database::Job, OnBeforeUpdateJobTaskDimension, '', false, false)]
        local procedure Job_OnBeforeUpdateJobTaskDimension(var Job: Record Job; FieldNumber: Integer; ShortcutDimCode: Code[20]; var IsHandled: Boolean);
        var
            JobTask: Record "Job Task";
        begin
            IsHandled := true;
    
            JobTask.SetRange("Job No.", Job."No.");
            if JobTask.FindSet(true) then
                repeat
                    case FieldNumber of
                        1:
                            JobTask.Validate("Global Dimension 1 Code", ShortcutDimCode);
                        2:
                            JobTask.Validate("Global Dimension 2 Code", ShortcutDimCode);
                    end;
                    JobTask.Modify();
                until JobTask.Next() = 0;
        end;
     
    Hope this helps.
    Thanks
    ZHU
     
  • yoheswaran Profile Picture
    yoheswaran 225 on at
    How to hide the dimension message.
    Thanks for the reply YUN ZHU for Job Card i need the same process i don't have any event in Job Table object. Here the we have the message in "UpdateJobTaskDimQst".
     
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 76,221 Super User 2024 Season 2 on at
    How to hide the dimension message.
    Hi, generally, you can subscribe to the event before the message to skip the message.
    For example,
     
    Solutions to this type of problem:  https://yzhums.com/43837/
     
    Hope this can give you some hints.
    Thanks.
    ZHU

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans