• SugarQuery N-Deep Join Issue

    I tried the N-Deep join from https://developer.sugarcrm.com/2014/04/22/sugarcrm-cookbook-sugarquery-the-basics/ but it seems to be not working. did anything changed in Sugar 7.7 $query = new SugarQuery(); $query->from(BeanFactory::getBean('Accounts')…
  • SugarQuery Joinraw alternative for email related tables

    For a customer we are in the process of upgrading from 7.6.x to 7.9.3. Many things have changed over the time and therefore we face lots of issues. One of these issues that we are facing is the depcrecation of the joinRaw() function on SugarQuery. In…
  • Is there a way to do a left join with SugarQuery()?

    I would like the join highlighted below to be a left join so the TCX_ProductMappings record is always returned regardless of whether or not there is a linked TCX_Product record. $Query = new SugarQuery(); $Query->from(BeanFactory::getBean('TCX_ProductMappings…
  • SugarQuery with a Where clause field LIKE '%58%'

    I have a field in my DB, it is type INT. Lets call it test_int so <?php $query = new SugarQuery ( ) ; $query - > from ( BeanFactory : : getBean ( 'Accounts' ) ) ; $query - > select ( array ( 'id' , 'name' , 'test_int' ) ) ; $query - > where ( ) - > contains…
  • Simple SugarQuery using a custom field returns no results

    I created a custom Integer field called ticket_id_c in the Cases module and I can clearly see the field having the value my code is looking for in the cases_cstm table, but I still get no results. $sq = new SugarQuery ( ) ; $sq - > select ( 'id' ) ; …