Results 1 to 9 of 9

Thread: changing/deleting names of salestages (and in other dropdowns)

  1. #1
    ahab is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    11

    Default changing/deleting names of salestages (and in other dropdowns)

    Hi,
    Is there a way to remove the existing entries in a dropdown-list (without hacking in to the database)?
    I want to change the names of the salestages to my own.

    /Andreas

  2. #2
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    In Sugar 5.x you go to the dropdown editor.

    In the future it would be helpful to list system specifics.
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  3. #3
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    Quote Originally Posted by ahab
    Hi,
    Is there a way to remove the existing entries in a dropdown-list (without hacking in to the database)?
    I want to change the names of the salestages to my own.

    /Andreas
    You can do that hand-coding too.
    Take a look at <sugar-root>\include\language\en_us.lang.php
    there you'll find dropdown-lists and you'll easily change labels as you wish.
    What do you think the cookie monster eats ?

  4. #4
    ahab is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    11

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    Thank you for the replies! I have sugarCRM community edition 5.0b installed and I can only add values with the dropdown-editor, not remove nor change. Should it be possible to remove/change values with the dropdown editor?

    If not I will try changing the language file.

  5. #5
    ahab is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    11

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    Hi again,

    I've tried changing the values in the language file according to the advice above, but the changed values doesn't show up in the dropdown. Do I need to refresh the dropdown somehow?

    I've tried with F5 and ctrl+F5 and shift + F5.

  6. #6
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    1.) You should not use MS Internet Explorer to edit dropdown fields, there are some JavaScript errors in the studio.Firefox does not have these JavaScript errors.

    2.) You should not change the database values of the sales_stage_dom dropdown, as they are HARDCODED in some modules, e.g. Dashlets and Opportunity lists. Look to following findings:
    modules\Charts\code\Chart_lead_source_by_outcome.p hp(270): $salesStages = array("Closed Lost"=>$app_list_strings['sales_stage_dom']["Closed Lost"],"Closed Won"=>$app_list_strings['sales_stage_dom']["Closed Won"],"Other"=>$other);
    modules\Charts\code\Chart_lead_source_by_outcome.p hp(290): if($row['sales_stage'] == 'Closed Won' || $row['sales_stage'] == 'Closed Lost'){
    modules\Charts\code\Chart_outcome_by_month.php(278 ): $salesStages = array("Closed Lost"=>$app_list_strings['sales_stage_dom']["Closed Lost"],"Closed Won"=>$app_list_strings['sales_stage_dom']["Closed Won"],"Other"=>$other);
    modules\Charts\code\Chart_outcome_by_month.php(295 ): if($row['sales_stage'] == 'Closed Won' || $row['sales_stage'] == 'Closed Lost'){
    modules\Opportunities\ListViewTop.php(53): $where = "opportunities.sales_stage <> 'Closed Won' AND opportunities.sales_stage <> 'Closed Lost' AND opportunities.assigned_user_id='".$current_user->id."'";
    modules\Opportunities\Opportunity.php(323): $query = "select amount, id from opportunities where (". $idequals. ") and deleted=0 and opportunities.sales_stage <> 'Closed Won' AND opportunities.sales_stage <> 'Closed Lost';";

    3.) The dropdowns sales_probability_dom and quote_stage_dom depend directly from sales_stage_dom, look to
    include\language\en_us.lang.php

    4.) After changing dropdowns you should call "admin" "repair" " Rebuild Javascript Languages" to rebuild the JavaScript versions of the language files.

  7. #7
    ahab is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    11

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    Thank you, thank you, thank you!

  8. #8
    MadSugar is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    13

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    Currently it is not possible to remove values from standard sugar domains using a manifest file. In file include/utils.php all app_list_strings are merged with the standard values. Adding and removing of domain values is possible using custom language files.
    Comment out the line below (around line 760) to disable the app_list_string merging.
    Code:
    	// cn: bug 6048 - merge en_us with requested language
    	$app_list_strings = sugarArrayMerge($en_app_list_strings, $app_list_strings);
    I've reported this as bug 20636 .

  9. #9
    MadSugar is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    13

    Default Re: changing/deleting names of salestages (and in other dropdowns)

    I have found a simple work around to solve the problem above.

    When you wan't to remove an existing domain or domainvalue from a standard language file, you 'll have to add the next line to a custom language file, For example, the lines below replace the standard sales_stage_domain with a customized domain:

    Code:
    unset($en_app_list_strings['sales_stage_dom']); // Remove the standard sales_stage_dom to prevent merging of standard and customized domain.
    $app_list_strings['sales_stage_dom'] = array(   // New domain. 
    	'Prospecting' => "Prospecting",
    	'Proposal/Price Quote' => "Proposal/Price Quote",
    	'Negotiation/Review' => "Negotiation/Review",
    	'Closed Won' => "Closed Won",
    	'Closed Lost' => "Closed Lost",
    );
    Explanation: $en_app_list_strings['domain'] contains all standard values for 'domain' as specified in "include/language/en_us.lang.php". In file "include/utils.php" this variable is merged with your customized $app_list_strings. By removing $en_app_list_strings['domain'] this merge will not occur for this domain, Problem solved

Thread Information

Users Browsing this Thread

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

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
  •