Results 1 to 3 of 3

Thread: Adjusting controls based on rolls

  1. #1
    acarne is offline Junior Member
    Join Date
    Aug 2007
    Posts
    2

    Default Adjusting controls based on roles?

    I'm using open Source Version 4.5.1d (Build 1273) and have set up a role for users who can only see their own records. Is there a way to eliminate the "assigned to" filter from showing up in the modules' list views since it really serves no purpose? If I use the studio to eliminate the "assigned to" control I loose the feature for users who do need the filter.
    Last edited by acarne; 2007-09-13 at 07:20 PM.

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Adjusting controls based on rolls

    You cannot selectively remove components based on the user that is logged in, at least not without making customizations directly within the HTML/PHP source files.

    5.0 will include functionality along these lines, but I am not sure if it will extend to what you are looking for.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Adjusting controls based on roles?

    Simply edit the EditView.html files remove the assigned_to_name field (the visable one) and leave only the field:

    <input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />

    which is a hidden field. This field is required so you cannot remove it but it is hidden anyway.

    so to recap look in the EditView.html and look for lines that look like this:

    <td class="dataLabel"><span sugar='slot19'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
    <td class="dataField"><span sugar='slot19b'><input class="sqsEnabled" tabindex="1" autocomplete="off" id="assigned_user_name" name='assigned_user_name' type="text" value="{ASSIGNED_USER_NAME}"><input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
    <input title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='1' class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name=btn1
    onclick='open_popup("Users", 600, 400, "", true, false, {encoded_users_popup_request_data});' /></span sugar='slot'>
    </td>

    and remove everything unneeded and you will end up with

    <td class="dataLabel">&nbsp;</td>
    <td class="dataField"><input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
    </span sugar='slot'>
    </td>


    I hope this helps
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VCR Controls not appearing for one user
    By tparson in forum Help
    Replies: 0
    Last Post: 2007-05-10, 11:23 PM
  2. Sugar CRM for a Services based businesses
    By simonburgoyne in forum General Discussion
    Replies: 5
    Last Post: 2007-05-03, 11:38 AM
  3. hericheacal role based security
    By bhawin13 in forum Developer Help
    Replies: 3
    Last Post: 2006-10-11, 12:09 PM
  4. Hiding values based on team
    By mrobertson in forum Developer Help
    Replies: 4
    Last Post: 2006-08-03, 12:33 AM
  5. How to make a field read only based on data
    By prismainc in forum Help
    Replies: 0
    Last Post: 2006-06-11, 01:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •