Results 1 to 7 of 7

Thread: import: add a custom field as index to check duplicates

  1. #1
    analyst123 is offline Member
    Join Date
    Jun 2009
    Posts
    17

    Default import: add a custom field as index to check duplicates

    Hello
    I have some trouble with import feature customization in Sugar Community Edition 5.2.

    I would like to use a custom field named 'partita_iva_c' created in Accounts module as index to check duplicates to import accounts records from external source (.csv files).

    I have added the following line to the /modules/Accounts/vardef.php file in 'indices' => array section:

    array('name' =>'idx_partita_iva', 'type' =>'index', 'fields'=>array('partita_iva_c')),

    when I go to the Admin section and try to repair Sugar to update it with the new index I receive the following error message:

    Executing repair query: Query Failed:ALTER TABLE accounts ADD INDEX idx_partita_iva (partita_iva_c)::MySQL error 1072: Key column 'partita_iva_c' doesn't exist in table

    I guess it happens because 'partita_iva_c' is a custom field so it's not allocated in 'accounts' table.
    May someone help me to find the solution ?
    tks a lot

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: import: add a custom field as index to check duplicates

    You can use DevToolKit to accomplish this feature.
    The link to DevToolKit is in my signature.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    analyst123 is offline Member
    Join Date
    Jun 2009
    Posts
    17

    Default Re: import: add a custom field as index to check duplicates

    Andrè, thank you very much for your suggestion.
    I have just installed devtoolkit 0.5 module.
    May you tell me more about what I have to do?
    tks a lot in advance
    regards

  4. #4
    jernel22 is offline Junior Member
    Join Date
    May 2009
    Posts
    2

    Default Re: import: add a custom field as index to check duplicates

    Hello, I am using the SugarOpenCloud hosted version of Sugar Express 5.2.0.
    I am trying to create in import index on a custom field in the Customer Accounts Module.

    Can you help me figure out how to do this from the hosted version, were I don't have access to the .php files?

    Thank You

  5. #5
    oogway is offline Member
    Join Date
    Oct 2009
    Posts
    10

    Default Re: import: add a custom field as index to check duplicates

    Quote Originally Posted by andopes View Post
    You can use DevToolKit to accomplish this feature.
    The link to DevToolKit is in my signature.

    Regards
    Will DevTookKit work for Sugar6? in Cloud Counsel?

    I need to be able to add an index on a custom field, so any help you could provide would be much appreciated.

    Thank you,
    Daniel

  6. #6
    manfredpw is offline Member
    Join Date
    Sep 2010
    Posts
    9

    Default Re: import: add a custom field as index to check duplicates

    Quote Originally Posted by oogway View Post
    Will DevTookKit work for Sugar6? in Cloud Counsel?

    I need to be able to add an index on a custom field, so any help you could provide would be much appreciated.

    Thank you,
    Daniel
    I need the same function for Sugar6.

    Anyone?

    Tks.

  7. #7
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: import: add a custom field as index to check duplicates

    Quote Originally Posted by manfredpw View Post
    I need the same function for Sugar6.

    Anyone?

    Tks.
    Hi guys

    Thanks for choosing DevToolKit

    DevToolKit, as it is, work on 6.0 without big deal.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to check for the duplicates ?
    By bandsb in forum General Discussion
    Replies: 32
    Last Post: 2009-06-04, 07:41 PM
  2. Replies: 0
    Last Post: 2008-10-17, 09:53 AM
  3. Replies: 0
    Last Post: 2008-08-31, 07:03 AM
  4. How to index a field in a custom table
    By gregwatson in forum Developer Help
    Replies: 0
    Last Post: 2008-05-29, 03:53 PM
  5. Replies: 0
    Last Post: 2006-09-13, 06:57 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
  •