Results 1 to 4 of 4

Thread: How to Turn/Off Developer Mode in SugarCRM?

  1. #1
    sureshbachala is offline Junior Member
    Join Date
    Dec 2010
    Posts
    7

    Smile How to Turn/Off Developer Mode in SugarCRM?

    Can any one suggest me how to turn on/off Developer Mode and what are the advantages and disadvantages in it... Really helpfull to everyone.


    Hi,

    Thank you so much for your Reply and we are facing 1 issue in Developer mode Turn on/off.. Please look into the below issue and Guide us.

    1.Create 2 Roles (CSA and Manager)
    2. Created 2 users CRMCSA and CRMMANAGER and associated with Above roles
    3. Created 2 custom modules using Module Builder and it has form fields are MODULE1 (name, Age, Approved(yes,no)) and MODULE2 (address, location, Approved(yes,no))
    4. using Deploy option from module builder i have successfully deployed

    Below are the customizations that i have made..

    Requirement : FOR MODULE1 AND MODULE2 - Approved(yes,no) Radion button should not display to CRMCSA and it should display only to CRMMANAGER

    For the Above requirement i made the below changes:

    Created custom View :
    in sugarcr\custom\\modules\MODULE1\views\view.edit.ph p

    $acl_role_obj = new ACLRole();
    $user_roles = $acl_role_obj->getUserRoles($current_user->id); // grab a list of the current user's roles

    if($user_role[0] == 'CRMMANAGER' || $_SESSION['authenticated_user_id'] == '1')
    $metadataFile = 'custom/modules/MODULE1/metadata/editviewdefs.php';
    else
    $metadataFile = 'custom/modules/MODULE1/metadata/editviewdefs_cust.php'



    2. I duplicated ediviewdefs.php and renamed to editviewdefs_cust.php file and commented the Approved Array in editviewdefs_cust.php.
    /*
    1 =>
    array (
    'name' => 'approved',
    'studio' => 'visible',
    'label' => 'LBL_APPROVED',
    ),
    */

    3. I TURNED on Developer mode to ON and refreshed the MODULE1 EDIT view after logging WITH CRMCSA. its working fine with CRMCSA and Logging with CRMMANAGER i'm able to see the APPROVED radio button.

    Everything is working fine.. At last when it is moved to production the developer mode is TURNED OFF and its this functionality is not working.. who ever the users first logged in that ediviewdefs.php array is generating in cache folder and it was displaying..

    example : if CRMCSA LOGGED IN it's displaying FORM without Approved(yes,no) radio buttons and same FORM is getting for CRMMANAGER actually it should display Approved(yes,no) Radion button for CRMMANAGER.
    If i TURN on Developer mode then its working fine.

    PLEASE GUIDE ME HOW TO FIX THIS ISSUE.. EVEN DEVELOPER MODE TURNED OFF IT SHOULD WORK.

    PLEASE SUGGES ME
    Last edited by sureshbachala; 2011-09-08 at 07:18 AM.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to Turn/Off Developer Mode in SugarCRM?

    Hi Suresh

    You can turn Dveloper Mode on/off by Admin -> System Settings -> Developer Mode.
    As the feature name says, it enable Developer Mode, that means, if you are developping some feature on Sugar it is interesting to enable Developer Mode. Its function is:
    If Developer Mode is enabled so Sugar will not cache template files and languages.
    If Developer Mode is disabled and you want to reload the template files and languages so you have to go to Admin -> Repair -> Quick Repair and Rebuild.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    sureshbachala is offline Junior Member
    Join Date
    Dec 2010
    Posts
    7

    Default Re: How to Turn/Off Developer Mode in SugarCRM?

    Hi,

    Thank you so much for your Reply and we are facing 1 issue in Developer mode Turn on/off.. Please look into the below issue and Guide us.

    1.Create 2 Roles (CSA and Manager)
    2. Created 2 users CRMCSA and CRMMANAGER and associated with Above roles
    3. Created 2 custom modules using Module Builder and it has form fields are MODULE1 (name, Age, Approved(yes,no)) and MODULE2 (address, location, Approved(yes,no))
    4. using Deploy option from module builder i have successfully deployed

    Below are the customizations that i have made..

    Requirement : FOR MODULE1 AND MODULE2 - Approved(yes,no) Radion button should not display to CRMCSA and it should display only to CRMMANAGER

    For the Above requirement i made the below changes:

    Created custom View :
    in sugarcr\custom\\modules\MODULE1\views\view.edit.ph p

    $acl_role_obj = new ACLRole();
    $user_roles = $acl_role_obj->getUserRoles($current_user->id); // grab a list of the current user's roles

    if($user_role[0] == 'CRMMANAGER' || $_SESSION['authenticated_user_id'] == '1')
    $metadataFile = 'custom/modules/MODULE1/metadata/editviewdefs.php';
    else
    $metadataFile = 'custom/modules/MODULE1/metadata/editviewdefs_cust.php'



    2. I duplicated ediviewdefs.php and renamed to editviewdefs_cust.php file and commented the Approved Array in editviewdefs_cust.php.
    /*
    1 =>
    array (
    'name' => 'approved',
    'studio' => 'visible',
    'label' => 'LBL_APPROVED',
    ),
    */

    3. I TURNED on Developer mode to ON and refreshed the MODULE1 EDIT view after logging WITH CRMCSA. its working fine with CRMCSA and Logging with CRMMANAGER i'm able to see the APPROVED radio button.

    Everything is working fine.. At last when it is moved to production the developer mode is TURNED OFF and its this functionality is not working.. who ever the users first logged in that ediviewdefs.php array is generating in cache folder and it was displaying..

    example : if CRMCSA LOGGED IN it's displaying FORM without Approved(yes,no) radio buttons and same FORM is getting for CRMMANAGER actually it should display Approved(yes,no) Radion button for CRMMANAGER.
    If i TURN on Developer mode then its working fine.

    PLEASE GUIDE ME HOW TO FIX THIS ISSUE.. EVEN DEVELOPER MODE TURNED OFF IT SHOULD WORK.

    PLEASE SUGGES ME

  4. #4
    sureshbachala is offline Junior Member
    Join Date
    Dec 2010
    Posts
    7

    Default Re: How to Turn/Off Developer Mode in SugarCRM?

    ISSUE FIXED:

    Please use this the below steps to resolve it. :

    1. Go to the Custom folder example : sugarcrm\custom\modules\<your_module_name>\views\v iew.edit.php

    2. Please include this LINE immediate function start "$GLOBALS['sugar_config']['developerMode']=1;"

    3. For every request the developer mode Turn on and render the Page in Cache and it will get Turn off.

    4. Example given below.

    function preDisplay()
    {
    $GLOBALS['sugar_config']['developerMode']=1;
    }

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can't enbable Developer Mode
    By ServerStorm in forum Developer Help
    Replies: 7
    Last Post: 2011-09-09, 10:23 PM
  2. developer mode on or off
    By kkumar in forum Developer Help
    Replies: 5
    Last Post: 2009-09-01, 07:16 AM
  3. Developer mode in trial version
    By gallente in forum General Discussion
    Replies: 4
    Last Post: 2009-05-06, 10:08 AM
  4. Developer Mode 5.0
    By marketadvantage in forum Developer Help
    Replies: 2
    Last Post: 2008-03-12, 08:06 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
  •