Restrict Number of Users per Company

LewisJamesLewisJames Member Posts: 7
I have a client that wants to restrict the number of user sessions per company. He wants to allow 10 user sessions open in one company, 12 in another etc. Has anyone done this?

Comments

  • ara3nara3n Member Posts: 9,256
    Create a table with pk company name, User ID.


    In GL Setup have max Number of users field.


    OnCompanyOpen trigger in CU 1 insert record into the table and also check how many records are in the table and if goes over max number of Users and error out.


    OnCOmpanyClose you can delete the record for that user.


    Some client will crash (happens rarely) but in order to compensate for that.

    OnCOmpanyOpen check and make sure all the users in the new tables are actually logged in (session table).

    30 min mod.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    Note: User with "Super" permissions (for example YOU) should be ever have the right to connect ;-)
    Do you make it right, it works too!
  • ara3nara3n Member Posts: 9,256
    oh and the table should be company independant or you could just have User ID as a field and don't need company because it will be separate table for each company.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    like written in this post;-)
    Do you make it right, it works too!
Sign In or Register to comment.