Modify drop-list of SUGAR on Revenu Line item

Hello,

I need to know if it is possible to add a new choice in the "sales_stage_dom" drop-down list, and another one in the sales_probability_dom on the "Revenu line item" module.

Because, we can't create a new Opportunity and revenu line items anymore since i modified theses drop-down liste :
- Sales_stage_dom
- sales_probability_dom

The changes in orange i made in our instance Sugar : 

Sales_stage_dom Clé[libellé]

sales_probability_dom Clé[libellé]

Stand by[Standby]

Standby[10%]

Prospection[Prospection]

Prospecting[10% 25%]

Proposal / Price Quote[Devis/proposition]

Negoctiation/Review[65% 75% ]

Negociation / Review[StandbyEtude]

Proposal/Price Quote[80% 50%]

Close Won[Gagné]

Closed Won[100%]

Close Lost[Perdu]

Closed Lost[0%]



Here is the screenshot when I try to create : 


Here is the message d'error :  


The others users have the same problem as me.

I downloaded the sugarcrm.log, i've founded this :
Mon Dec 9 10:01:23 2024 [3890][be7d586d-bf9e-4d76-ad5e-0807bb33db13][FATAL] An exception occurred while executing a query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') THEN 1 ELSE 0 END is_closed FROM revenue_line_items LEFT JOIN revenue_line_ite' at line 1; Query: SELECT revenue_line_items.service_start_date, CASE WHEN sales_stage IN () THEN 1 ELSE 0 END is_closed FROM revenue_line_items LEFT JOIN revenue_line_items_cstm revenue_line_items_cstm ON revenue_line_items_cstm.id_c = revenue_line_items.id WHERE (( revenue_line_items.team_set_id IN (select /*+ SUBQUERY(MATERIALIZATION) */ tst.team_set_id from team_sets_teams tst
INNER JOIN team_memberships team_membershipsrevenue_line_items ON tst.team_id = team_membershipsrevenue_line_items.team_id
AND team_membershipsrevenue_line_items.user_id = 'be7d586d-bf9e-4d76-ad5e-0807bb33db13'
AND team_membershipsrevenue_line_items.deleted = 0) ) AND ((revenue_line_items.opportunity_id = ?) AND (revenue_line_items.service = ?) AND (revenue_line_items.sales_stage IS NULL OR revenue_line_items.sales_stage NOT IN (NULL)))) AND (revenue_line_items.deleted = ?) ORDER BY is_closed ASC, revenue_line_items.service_start_date ASC LIMIT 1; Params: array (
0 => '8bca9c60-b614-11ef-8bfd-9d219e74a29c',
1 => 1,
2 => 0,
)

Can you have me to resolve the problem please ? Without this, we can't continue to create news opportunities yet.

Many thanks, 

Best regards, 

Phuong

Parents Reply Children
  • Hi  ,

    That's odd behavior. These values are stored at the database layer, so I'm not sure why it would fail to update. Please do the following:

    1. Go to the Custom Queries module to create a new query (e.g. https://<your_sugar_URL>/#bwc/index.php?module=CustomQueries&action=EditView&return_module=CustomQueries&return_action=DetailView)
    2. Give the query a name and put the following query in the Custom Query box:
      SELECT 
          * 
      FROM 
          config 
      WHERE 
          name IN ('sales_stage_won', 'sales_stage_lost');
    3. Click 'Save'
    4. Click 'Run Query' for the query you created

    If the query returns any results, post them here. If you don't get any results, run the following query on your database:

    INSERT INTO 
        config (category, name, value, platform) 
    VALUES 
        ('Forecasts', 'sales_stage_won', '["Closed Won"]', 'base'),
        ('Forecasts', 'sales_stage_lost', '["Closed Lost"]', 'base');    

    Note: If you are hosted in Sugar Cloud, you will need to open a support case for them to run the above query.

    Once the query is executed, go to Admin > Repair > Quick Repair & Rebuild, then check the dropdown list to see if it properly reflects the categorizations. 

    Chris

  • Hi Chris, 

    I've tried your query and here is the result : 

    The result seems strange to me, What do you think ? 

    Do you think that i must open a support case and ask to run the 2nd query ? 

    I've already open a case with SUGAR Support, they think that our problem is similiar to issue #90615 https://portal.sugarondemand.com/#supp_Bugs/90615

    If there is no solution quickly (cause i've implemtent the case in our instance prod...), i have to ask Support to restore the backup of our instance prod before this monday. I'm affraid that will cause trouble for our current data  because of this changes in drop-down list.

    Thanks for your opinions. 

    Have a good day

    Phuong

  • Hi  ,

    I agree that the bug they reference does seem like a potential culprit. My recommendation is to try the documented workaround in the bug (i.e. change the dropdown list language to English and modify the Closed Won/Closed Lost property). If that still doesn't work, then please have Sugar Support run the following queries:

    UPDATE 
        config 
    SET 
        value = '["Closed Won"]'
    WHERE 
        name = 'sales_stage_won';
        
    UPDATE 
        config 
    SET 
        value = '["Closed Lost"]'
    WHERE 
        name = 'sales_stage_lost';

    Chris

  • Hi Chris, 

    Thank you for enlightening me.

    I’ve tested the proposed workaround, but unfortunately, it’s still not resolving the problem. I’ve requested Support to execute the SQL queries if no progress is made on their end.

    The last update I received was their acknowledgment of the bug #9061, but the response time has been slow. Meanwhile, we’re facing a critical risk of losing data if we can’t fix this issue promptly. In the worst case, we’ll need to restore data from Monday morning, which is far from ideal.

    I’d appreciate any advice or support on how to expedite this process or alternative solutions to consider.

    Thank you Chris,

    Have a good day

  • Hi Chris,

    Our issue is solved (finally). I'm so happy for that ! And of course thank for figuring out why it doesn't work. 

    Best regards. 

    Phuong