Results 1 to 4 of 4

Thread: Dashlets con filtri su più tabelle

  1. #1
    loredana.pavoni is offline Sugar Community Member
    Join Date
    Apr 2010
    Posts
    24

    Default Dashlets con filtri su più tabelle

    ciao a tutti,
    devo fare una dashlets che mostri tutte le Opportunità con un filtro su "Tipo Accounts=Cliente". In pratica non so dove mettere la query che sarà +o- "select * FROM opportunities INNER JOIN accounts WHERE accounts.tipo=cliente". Spero di essermi spiegata. Ho inserito nel file MyOpportunitiesDashlet.php una query che mi restituisce il valore del campo accounts.tipo=cliente e viene visualizzato correttamente nella dashlets, però ovviamente se aggiungo il campo nei filtri, questo non funziona.
    Qualcuno ha un'idea?
    thanks in advanced

  2. #2
    fulvio is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Lesmo - MB
    Posts
    124

    Default Re: Dashlets con filtri su più tabelle

    Ciao,
    prova a vedere se questo può aiutarti:
    http://www.sugarcrm.com/forums/showthread.php?t=62563

    fulvio

  3. #3
    Sugarjunkie is offline Senior Member
    Join Date
    Dec 2009
    Location
    Mestre, Italy
    Posts
    23

    Default Re: Dashlets con filtri su più tabelle

    Ciao Loredana,

    a parte interventi sul codice, sui quali non mi esprimo per mia somma incompetenza, da quanto scrivi mi pare di capire che ti interessa (anche) distinguere le offerte fatte ai clienti già acquisiti (il classico "parco") dalle altre.
    Io mi accontento del filtro "tipo" (Business esistente/Nuovo affare nella mia localizzazione) nel dashlet delle opportunità.

    Ricordati di citare sempre la versione che usi, altrimenti è come dire "la FIAT che uso..."
    ----------------------------------------------------------------------------
    Sto traducendo la Guida Utente della ver. CE 5.2. Vuoi aiutare?
    ----------------------------------------------------------------------------

  4. #4
    loredana.pavoni is offline Sugar Community Member
    Join Date
    Apr 2010
    Posts
    24

    Default Re: Dashlets con filtri su più tabelle

    grazie a tutti, l'idea di fulvio è ottima ed è la strada che sto percorrendo.
    Vorrei utilizzare
    function process($lvsParams = array()) {
    $lvsParams['custom_from'] = "LEFT JOIN............."
    $lvsParams['custom_where'] = "accounts.tipo=cliente'"
    ecc.....

    Però non so come fare per stampare la query che sugar confeziona? Vorrei vedere la query che viene lanciata perchè devo sistemare alcuni errori, infatti così non funziona. Non so se la query viene costruita nella function buildWhere()
    Sapete dirmi come posso fare qualcosa del tipo print $query
    grazie ancora

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DropDown e tabelle nel db
    By pinop in forum Italiano
    Replies: 2
    Last Post: 2010-01-27, 06:43 AM
  2. Dropdown e tabelle
    By DragonflyMaster in forum Italiano
    Replies: 8
    Last Post: 2009-04-28, 01:10 PM
  3. Inserimento dati su tabelle custom
    By e.bertellino in forum Italiano
    Replies: 0
    Last Post: 2009-01-22, 03:18 PM
  4. Problema filtri ZuckerReports - sugar 5.0
    By federico.villoni in forum Italiano
    Replies: 3
    Last Post: 2008-03-28, 02:41 PM
  5. Add Dashlets:Module View doesn't show all avaliable dashlets
    By Systems Navigator in forum Developer Help
    Replies: 0
    Last Post: 2007-05-30, 01:59 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
  •