Comments
This has been a perennial grievance of mine, along with getting rid of the 'Initial public view' SB tab (turns out it was an easy fix). However, the JSON code appears to already exist. Here are the steps that I have working in a PoC environment atm:Do a classic Advanced Find and search for 'Schedule Board Settings" Select your Schedule Board Settings row (To hide 'Initial Public View', just select and deactivate - problem solved)When opened, scroll all the way to the bottom of the Settings field in the 'Other' sectionLocate "ViewMode":"hourAndDay","WorkHours":{"end":18,"start":8} I set the default hours to 8A-6P hereInsert the following code after the "hourAndDay","WorkDays":{"Friday":true,"Monday":true,"Saturday":false,"Sunday":false,"Thursday":true,"Tuesday":true,"Wednesday":true},"WorkHours":{"end":18,"start":8}Save it and refresh your SBOpen the Schedule Board's Schedular Settings and you'll see the updated UI with the individual day selections
I prepared my description for the same idea, but then found that there is one already, so I will upvote and add my comments.Account Schedule KPI in Financial Reports is a good example of this kind of set update.https://github.com/microsoft/BusinessCentralApps/blob/main/App/Layers/W1/BaseApp/Finance/FinancialReports/AccSchedKPIEventHandler.Codeunit.alHere, the web service setup is updated when a G/L Budget is changed. To track budget changes, the event handler codeunit subscribes to database insert / update / delete events, which forces ModifyAll and DeleteAll to trigger separate Update / Delete statements on each record, and Insert operation will not collect the bulk insert buffer. This can greatly undermine performance of massive updates - especially ModifyAll and DeleteAll operations.These updates could be triggered once after DeleteAll or ModifyAll is executed and avoid subscribers bound to OnAfterDeleteEvent and OnAfterModifyEvent - if Business Central platform published such events.I suggest to introduce two database events: OnAfterDeleteSet and OnAfterModifySet.OnAfterDeleteSet event should be called after Delete or DeleteAll statement is executed.Respectively, OnAfterModifySet should be invoked after Modify or ModifyAll.Events can have the following signature:OnAfterDeleteSet(RecRef: RecordRef)OnAfterModifySet(RecRef: RecordRef)The primary key of the RecRef is initialized only if the event is triggered by an operation on a single record (Delete or Modify). When the event is invoked from bulk operations, the primary key remains uninitialized, but filters from the source record are transferred to the RecRef, so the client subscribing to the even can retrieve the range of affected records.
