Results 1 to 6 of 6

Thread: Add Export fields in Employees Module

  1. #1
    akron is offline Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Default Add Export fields in Employees Module

    Hello everyone!

    Could anyone tell me where to find the code that defines the field for the export CSV for the employees module?
    I've found it for contacts and accounts, but unfortunately not for users. I hope that this hasn't been aksed before, but I've been searching through the forums and couldn't find anything useful. I'm quite new to Sugar but made some modifications already, and understand PHP and SQL quite well, so if you just could tell me where to find the code, I think I'll be able to manage it myself.

    The problem is the following:
    Our company has different subcompanies in different countries. So I've added a field on the employees module that shows the right company name. We use Active Directory and the data comes automatically from the related field via LDAP.
    But if I want to export a complete list of our employees to a CSV, the company name is missing.
    I hope anyone can help me. Thank you very much in advance and

    Best regards,

    Christian

  2. #2
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Add Export fields in Employees Module

    take a look at function create_export_query($order_by, $where) in /modules/Employees/Employee.php
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  3. #3
    akron is offline Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Default Re: Add Export fields in Employees Module

    Hey, wow, thanks a lot for your fast answer. It was so obvious ...

    So I just defined the needed fields in field_arrays.php (I also wanted to remove some of them and this worked very fine too).
    But there's one thing I don't know how to handle:
    I would like to change the order of the colums in the export. But if I do it in "export_fields" array only, then the export doesn't work anymore. I recognized that the users array has to have exactly the same order.
    But can I change that or does that affect other things too? I'm afraid that I might crash something else by editing the users array ...
    Thanks again and

    Kind regards,

    Christian

  4. #4
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: Add Export fields in Employees Module

    if you want such modifications to be applied to Employees module, then you'd better modify mentioned function.
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  5. #5
    akron is offline Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Default Re: Add Export fields in Employees Module

    OK, thank you. Not that clean method, but works fine and the result counts!

  6. #6
    kingjatin is offline Senior Member
    Join Date
    May 2010
    Location
    India
    Posts
    35

    Default Re: Add Export fields in Employees Module

    Hi,

    I have a custom module build to maintain the records to employees with some fields added according to our needs.

    Now I want to limit the export fields, can anyone pls help to identify the function that need to be modified and which file?

    Thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Module Builder
    By Olavo in forum Downloads
    Replies: 418
    Last Post: 2009-02-26, 06:36 AM
  2. add custom field relate other fields
    By longnv in forum Developer Help
    Replies: 6
    Last Post: 2007-02-26, 07:33 AM
  3. Which files must add if i want to add new module?
    By sugarcrmvn in forum Developer Help
    Replies: 7
    Last Post: 2006-03-31, 08:00 AM
  4. Steps to add new Module in SugarCRM 4.0.1
    By AbhishekKatiyars in forum Help
    Replies: 0
    Last Post: 2006-02-20, 04:56 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
  •