Results 1 to 2 of 2

Thread: Aggiungere campo ad un dashlet

  1. #1
    arasdeveloper is offline Senior Member
    Join Date
    Jul 2008
    Posts
    31

    Default Aggiungere campo ad un dashlet

    Ciao a tutti,
    ho inserito un nuovo campo all'interno del dashlet "Le mie riunioni" che mostra la città e la provincia di una ditta. Per estrarre i dati di mio interesse ho modificato il file modules/Meetings/Meeting.php, ma non viene visualizzato nulla all'interno del dashlet. Se alla variabile assegno però una stringa viene visualizzata.
    Per estrarre queste informazioni utilizzo le stesse istruzioni utilizzate per ricavare il nome della ditta dalle tabelle 'Leads','Contacts' e 'Accounts'. Devo apportare alcune modifiche anche in altri file?
    Vi ringrazio.
    Ciao.

  2. #2
    arasdeveloper is offline Senior Member
    Join Date
    Jul 2008
    Posts
    31

    Default Re: Aggiungere campo ad un dashlet

    Ho controllato la correttezza delle query e sono esatte. Ho notato però che all'interno della funzione get_list_view_data del file Meeting.php la mia variabile non assume nessun valore, e di conseguenza all'interno della colonna "Città" del dashlets non compare nulla.Qualcuno mi sa dire qualche altro file devo modificare?La mia variabile è formata dalla collonna billing_address_city e billing_address_state della tabella accounts oppure primary_address_city e primary_address_state della tabella Leads e Accounts.

    PHP Code:
    function get_list_view_data() {
                    
    $meeting_fields $this->get_list_view_array();
                    global 
    $app_list_strings$focus$action$currentModule$image_path;
                    if(isset(
    $this->parent_type))
                            
    $meeting_fields['PARENT_MODULE'] = $this->parent_type;
                    if(
    $this->status == "Planned") {
                            
    //cn: added this if() to deal with sequential Closes in Meetings.       this is a hack to a hack(formbase.php->handleRedirect)
                            
    if(empty($action)) { $action "index"; }
                            
    $meeting_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=$this->id&action=EditView&status=Held&module=Meetings&record=$this->id&status=Held'>".get_image($image_path."close_inline","alt='Close' border='0'")."</a>";
                    }
                    global 
    $timedate;
                    
    $today gmdate('Y-m-d H:i:s'time());
                    
    $nextday gmdate('Y-m-d'time() + 3600*24);
                    
    $mergeTime $meeting_fields['DATE_START']; //$timedate->merge_date_time($meeting_fields['DATE_START'], $meeting_fields['TIME_START']);
                    
    $date_db $timedate->to_db($mergeTime);
                    if(
    $date_db     $today        ) {
                            
    $meeting_fields['DATE_START']= "<font class='overdueTask'>".$meeting_fields['DATE_START']."</font>";
                    }else if(
    $date_db       $nextday) {
                            
    $meeting_fields['DATE_START'] = "<font class='todaysTask'>".$meeting_fields['DATE_START']."</font>";
                    } else {
                            
    $meeting_fields['DATE_START'] = "<font class='futureTask'>".$meeting_fields['DATE_START']."</font>";
                    }
                    
    $meeting_fields['CONTACT_ID'] = empty($this->contact_id) ? '' $this->contact_id;
                    
    //echo("<p>Indirizzo".$this->mia_variabile."</p>");
                    
    $meeting_fields['MIA_VARIABILE'] = $this->mia_variabile;
                    
    //echo("<p>".$this->parent_name."</p>");
                    
    $meeting_fields['PARENT_NAME'] = $this->parent_name;
                    return 
    $meeting_fields;
            } 

    Quote Originally Posted by arasdeveloper
    Ciao a tutti,
    ho inserito un nuovo campo all'interno del dashlet "Le mie riunioni" che mostra la città e la provincia di una ditta. Per estrarre i dati di mio interesse ho modificato il file modules/Meetings/Meeting.php, ma non viene visualizzato nulla all'interno del dashlet. Se alla variabile assegno però una stringa viene visualizzata.
    Per estrarre queste informazioni utilizzo le stesse istruzioni utilizzate per ricavare il nome della ditta dalle tabelle 'Leads','Contacts' e 'Accounts'. Devo apportare alcune modifiche anche in altri file?
    Vi ringrazio.
    Ciao.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dashlet option not appearing in Add Dashlet screen
    By lowJack01 in forum Developer Help
    Replies: 0
    Last Post: 2008-07-17, 07:30 PM
  2. Replies: 0
    Last Post: 2008-06-13, 04:25 PM
  3. Replies: 0
    Last Post: 2007-10-09, 07:55 AM
  4. DASHLET: New Thread dashlet for 4.5.0RC
    By ruchida in forum Downloads
    Replies: 5
    Last Post: 2007-02-28, 12:36 AM
  5. Replies: 1
    Last Post: 2006-10-27, 09:01 AM

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
  •