Results 1 to 2 of 2

Thread: Zucker and Custom Fields

  1. #1
    gkeyes is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    29

    Default Zucker and Custom Fields

    Sugar Version 5d --- Zucker 1.8

    I created a customer field in LEADS called golds_member_c. I see that it also created a table called LEADS_CSTM

    I am trying to pull that field in my report but keep getting MYSQL errors.

    My code: WITHOUT changes.
    ************************************************** ************************************************** *****************************
    SELECT
    if (parent_type = 'leads', concat(leads.first_name, ' ', leads.last_name), ' ') as 'Lead Name',
    if (parent_type = 'accounts', `accounts`.name, concat(contacts.first_name, ' ', contacts.last_name)) as 'Account/Contact Name',
    notes.date_entered AS 'Date Entered', notes.date_modified AS 'Date Modified', notes.name AS 'Subject', notes.description AS 'Notes'
    FROM notes
    LEFT JOIN accounts on notes.parent_id = accounts.id
    LEFT JOIN contacts on `notes`.`parent_id` = contacts.id
    LEFT JOIN leads on `notes`.`parent_id` = leads.id
    WHERE notes.deleted = 0
    AND notes.created_by = '$SUGAR_USER_ID'
    AND (notes.date_entered > '$StartDate' OR notes.date_modified > '$StartDate')
    ORDER BY notes.date_entered
    ************************************************** ************************************************** *****************************
    I have tried to LEFT JOIN LEADS and LEADS_CSTM, pull the field without joining, I have tried everything but what works.
    Since this field is already attached to LEADS I thought it would pull without joining.
    HELP!!!!!!!! What code should I use to simply get the GOLDS_MEMBER_C field to show in the report.

  2. #2
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Zucker and Custom Fields

    try

    left join leads_cstm on leads.id = leads_cstm.id_c
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating Selectable User Box in Zucker Reports
    By BriteComputers in forum Help
    Replies: 6
    Last Post: 2009-02-18, 03:34 PM
  2. Reporting and custom fields
    By phil81uk in forum Help
    Replies: 4
    Last Post: 2008-10-07, 08:09 PM
  3. Zucker and Custom added DB fields
    By gkeyes in forum Help
    Replies: 2
    Last Post: 2008-10-04, 12:38 PM
  4. Zucker Reports: create custom drop down list
    By poseidonfrax in forum Help
    Replies: 0
    Last Post: 2008-08-20, 02:37 PM
  5. Zucker Reports / Ireport help. Retained support
    By jamespcarter2 in forum Classifieds
    Replies: 2
    Last Post: 2007-04-13, 05:24 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
  •