16/04/2024

4 thoughts on “Business Central SaaS – Kill Sessions

  1. Is this supposed to work in BC 14 and above? Because it’s not working in 13.5.29483.0
    We have the problem for last 3 hours, some user locked Item table and we cannot post anything.

    1. hi Tin, i tested on r.14 also in production environment.

      I have verified that sometimes it closes the sessions correctly, sometimes not, it depends on the cases.
      for example if you have a session blocked by a report that is running very slow, closing the session unlocks the system (ex; the report Inventory evaluation)

      I have no deadlocked customers on tables on BC today, at most I have 40 connected users, no more currently.
      there are no other ways to kill the sessions that I know of.

  2. Hey,

    BC15, can’t delete from the table. I did successfully use the killsession command a few times, but not always. Seems kind of arbitrary as to whether it works. This is the code I added to the “Active Session List Custom” page (the other page is imo entirely useless):

    actions
    {
    area(Processing)
    {
    action(KillSession)
    {
    Caption = ‘Kill Session’;
    Promoted = true;
    PromotedCategory = Process;
    PromotedIsBig = true;
    ApplicationArea = All;

    trigger OnAction()
    begin
    if (not StopSession(Rec.”Session ID”)) then
    Message(‘Failed to stop session %1.’, Rec.”Session ID”);
    end;
    }
    }
    }

    I will say this, MS needs to allow us to kill sessions a lot more easily. They are digging their own grave by having people rely on a ticketing system to do so.

  3. Hello

    how to identify the user that lock ledger entry table for exemple.

    Best regeards

Comments are closed.