• Frustrated with standard reports (no DISTINCT clause), how can we use Enterprise (SQL) reports in dashlets?

    Hello Sugar lovers, We're regularly confronted to the limitations of the standard Sugar Reports module: No HAVING, no DISTINCT, no ability to make calculations... Currently our customers do not want to invest in third pary solutions (Discover and…
  • SugarCRM_ChatBot(GPT)

    I have created a Sugar ChatBot(GPT) for those wanting to ask questions about how to join tables and compose sql scripts, comments/suggestions welcome: github.com/.../Chat_SugarCRM
  • How to add condition in custom report query where clause to get records created in Last Quarter

    Hi All, Kindly suggest how to add condition in custom report query where clause to get records created in Last Quarter? Thanks, Shreya
  • Relate field visible in studio not found in database

    Hi all! Where can I find relate fields in the database? In studio we have a custom relate field on account named merged_into_c, which contains a link to another account. I want select the accounts which were merged into another account, but the…
  • Update cloud table from SQL query?

    I need to update my revenue_line_items table to set the Manufacturer_ID, Category_ID and Type_ID fields with the corresponding values from the appropriate record in the product_templates table. I downloaded a backup instance from the cloud and imported…
  • Calculating Opportunity Aging from Advance Reports

    We wanted to be able to create a report that will calculate opportunity aging without creating a bunch of new fields in Sugar. The idea behind this is I can create an Advanced Report query that would add calculated values for the "time in stage". I came…
  • Can you gather information from a Meeting and place it into an Advanced Report?

    Hi guys, I have a question...is there anyway to create an Advanced Report for information logged into a meeting for instance? I am trying to create a Custom Query to select the data entered into a meeting but I can't seem to gather the information to…
  • MySQL error 1062: Duplicate entry ' ' for key 'PRIMARY'

    I am getting a MySQL error regarding a duplicate entry when using the following code. <?php array_push($job_strings, 'list_refresh'); function list_refresh() // This function adds any new contacts on present day into the target list, runs daily. { $db…
  • How do I avoid SQL injection when using the DBManagerFactory? Is there any way to use parametrized queries?

    The DBManager - http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.7/Data_Framework/Database/DBManagerFac… - is indispensable for querying the database. My favorite way of preventing SQL injection is binding variables, so…
  • SQL Queries in v11

    Hello, In previous versions of the SugarAPI (v4, v3, etc.) it was possible to perform SQL queries as part of calls to get_entry_list, though I don't see any similar functionality in v11. Is it still possible to perform such queries when requesting records…
  • Simple logic hook Error 500 on On-Demand

    I created a namespaced before_save logic hook that queries the DB for the largest number in a custom field, increments the result and sets that on the record when a new opportunity is created. It works perfectly on On-Premise, but responds with an Error…