Method Community

 

Access Restriction After Hours

Last post 10-10-2013 8:07 AM by Method_Nelson. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-08-2013 3:43 PM

    Access Restriction After Hours

    We are looking for a way to restrict access to the CRM for certain users, after a certain time of day.  I haven't been able to update the Users table without getting an error.  Is there any (efficient) way to accomplish this?
    Thanks,
    Garrett 

  • 10-09-2013 1:57 PM In reply to

    Re: Access Restriction After Hours

    Hi Garrett,

    The most efficient way to go about restricting user access to the CRM afterhours is by building some logic into your screen's onLoad event.

    Before I go ahead and describe the workflow to you, I would recommend you organize your CRM users using tab groups (this will reduce the amount of work you will have to do later).

    Once a tab group has been created and customized to show the essentials to your CRM users, I would follow these steps to create that custom functionality you desire.

    Setting up Method

    1. Create a new field in the Users table which will define the Users Access (I called my field RestrictAccess with a field type of Yes/No)
    2. To edit this new value, you will have to create a new screen which will allow you to modify the entries in the table.
    3. Last but not least, create another screen with a label which displays a message to your users that access has been restricted.

    Setting up the onLoad event Actions

    1. Start by retrieving the User Name of the User that is currently logged in
    2. Then get the RestrictAccess value from the Users table for the user that is currently logged in
    3. If the value in this field is Yes than we can create a series of conditional statements which will validate the current time
    4. Retrieve the current time of the session and convert it to the 24hr clock using HH instead of hh for hours
    5. Using the 24 hour clock, you can then use a series of conditional statements to see if the time is between 09:00 and 17:00 (9am - 5pm)
    6. If the user logs into Method outside of the pre-determined times, you can take the user to the restricted screen and hide all of the tab links that are associated with that tab.

    There is one limitation to this workflow; you are required to customize these onLoad events for the default screen associated with each tab.

    For example:

    If you were customizing the Leads tab you would have to incorporate the onLoad logic into the Leads and Contacts List Screen.


    Happy Customizing!

    Nelson De Miranda
    Customization Solutions Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: n.demiranda@methodintegration.com
    LinkedIN: http://www.linkedin.com/in/NelsonDeMiranda
  • 10-09-2013 4:37 PM In reply to

    Re: Access Restriction After Hours

    Thanks for the info Nelson.

    One challenge I am having is hiding tab links on tabs other than the current/default tab.  I can hide the default screen for the default tab.  However, eventhough I add actions to hide tab links under other tabs, these actions are not working - the tab links are still visable when I click the other tabs.
    Most of our users have 2-3 tabs (Home, Customer, Tasks, etc.) shown by role.  For this to work, I would need to be able to hide the default screen on each separate tab.  I hope I am making sense.  Let me know if anything comes to mind that I might be overlooking.

    Thanks for your help.

    Garrett

  • 10-10-2013 8:07 AM In reply to

    Re: Access Restriction After Hours

    Hey Garrett,

    You're definitely not missing anything.

    The reason why you're experiencing this issue is related to the way Show / Hide Tab Links action works. In order for the action to "happen" the tab must first be loaded on the users screen.

    When you first log into Method, you only load the tab links on the Home Tab; however, the tab links on other tabs such as Customers and Leads are not loaded until the user interacts directly with that tab.

    Therefore, in order to customize the functionality you want, you would have to built it into the onLoad event of each default screen associated with each tab.

    Cheers,

    Nelson

    Nelson De Miranda
    Customization Solutions Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: n.demiranda@methodintegration.com
    LinkedIN: http://www.linkedin.com/in/NelsonDeMiranda
Page 1 of 1 (4 items)