Results 1 to 6 of 6

Thread: determing fields by Exporting Opportunities to csv

  1. #1
    intraserve is offline Junior Member
    Join Date
    Sep 2006
    Posts
    1

    Default determing fields by Exporting Opportunities to csv

    Hi all,

    when using the export function ad the opportunities is there a way to only export/display the collums that i need,

    now when I get all the collums but we usually need only 4 or 5 collums.

    hope some one can help me on that.

    Greets

    Nick
    IntraServe

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: determing fields by Exporting Opportunities to csv

    You can edit the file named "export_utils.php" in the root of the Sugar website. There is an array named $contact_fields that lists the fields to be displayed for a contact when exporting. Comment out the fields you don't want.
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  3. #3
    eagleone is offline Member
    Join Date
    Nov 2007
    Posts
    8

    Default Re: determing fields by Exporting Opportunities to csv

    Hello,
    I found this thread very interesting and tried to change my Sugar-crm CE Version 4.51h the way it been told.
    It seems to be quit different now, the File "export-utils.php you find now under \include\export-utils.php.

    But my problem is, that my changes on the export-utils.php have no effect on my leads.csv file i get.

    And some colums like "modified_user_id" or "deleted" are not in the export-utils.php file. They must be somewhere else.

    I need very urgent help with this, so if anybody can help me.... Please do it :-)


    By the way, a nother Problem I have is that in my leads.csv (Export File) are lots of Lines broken.
    The Lines switched into a second line.

    Thats real bad if you want to use the Exportdata.

    And realy nuts is, that when I just export 500 Leads, most time their is everything ok. If export 1000 , 1500 or the entire List (over 50.000 Leads) i get broken lines.

    PLEASE HELP ME. I urgently desperatly need the Data out of this F*** List. :-)

  4. #4
    Markku's Avatar
    Markku is offline Sugar Community Member
    Join Date
    Nov 2004
    Location
    Helsinki
    Posts
    910

    Default Re: determing fields by Exporting Opportunities to csv

    If you want to limit the number of colums when exporting leads, edit file modules/Leads/Lead.php

    around line 274, with function create_export_query change:

    Original:
    Code:
     $query = "SELECT
     leads.*,
     
     users.user_name assigned_user_name";
    To:
    Code:
     $query = "SELECT
     leads.first_name, leads.last_name, leads.lead_source, leads.email1,
     
     users.user_name assigned_user_name";
    You just have to define the column names you want to export (first_name, last_name, lead_source, email1 in this example).

  5. #5
    eagleone is offline Member
    Join Date
    Nov 2007
    Posts
    8

    Default Re: determing fields by Exporting Opportunities to csv

    :-) THANK YOU VERY MUCH :-) Markku!!!!

    You helped me very much. I noticed that the mistake with the line breaks only happened on 3 of 116 Users and only afte the field "primary_adress_street".

    Quite strange ....

    But I have one little second question, is it possible to show the assigned user name and not only the ID ???
    That is really important for us.

  6. #6
    Markku's Avatar
    Markku is offline Sugar Community Member
    Join Date
    Nov 2004
    Location
    Helsinki
    Posts
    910

    Default Re: determing fields by Exporting Opportunities to csv

    Hi eagleone, glad to be of help!

    Field "assigned_user_name" is already in the export query (see the line "users.user_name assigned_user_name") and it should export assigned user name. If it does not work, maybe you could post your version here?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2007-11-14, 09:15 AM
  2. Importing CSV entries into custom fields
    By jn122 in forum General Discussion
    Replies: 2
    Last Post: 2007-09-16, 12:50 AM
  3. exporting enum custom fields
    By dricrm in forum Developer Help
    Replies: 0
    Last Post: 2007-07-18, 04:41 PM
  4. Replies: 3
    Last Post: 2007-02-05, 09:43 PM
  5. Opportunities: custom fields not stored
    By vetler in forum General Discussion
    Replies: 0
    Last Post: 2005-05-26, 08:06 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
  •