Results 1 to 4 of 4

Thread: Auto Generate Account Number?

  1. #1
    bdfoster89 is offline Junior Member
    Join Date
    Oct 2010
    Posts
    1

    Exclamation Auto Generate Account Number?

    Setting up a SugarCRM instance for testing. I would like to implement an auto-generated account number. It needs to be unique, alpha-numeric, and be about 10 characters long. Is there any way I can easily do this without going through all sorts of trouble? I see that SugarCRM has a unique ID but it's too long for my tastes to use as a reference to an account. Using 6.0.1 CE.

    Thank you for your time,
    Brian Foster
    Endigo Computer LLC

  2. #2
    cbglobal's Avatar
    cbglobal is offline Senior Member
    Join Date
    Oct 2010
    Location
    Darmstadt
    Posts
    28

    Default Re: Auto Generate Account Number?

    Hi Brian,

    to solve this problem I would insert via Studio a new field, e.g. unique_id, into the Detail View of the Accounts module.
    Then I would implement a logic hook (before_save) with a new function which generates the desired unique ID.

    Best Regards,
    Chris
    Christiane Bender
    System Analyst
    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email:christiane.bender@devoteam.com
    http://www.devoteam.de

  3. #3
    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: Auto Generate Account Number?

    Quote Originally Posted by bdfoster89 View Post
    Setting up a SugarCRM instance for testing. I would like to implement an auto-generated account number. It needs to be unique, alpha-numeric, and be about 10 characters long. Is there any way I can easily do this without going through all sorts of trouble? I see that SugarCRM has a unique ID but it's too long for my tastes to use as a reference to an account. Using 6.0.1 CE.

    Thank you for your time,
    Brian Foster
    Endigo Computer LLC
    Hi Brian

    I hope this thread helps you.

    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.

  4. #4
    LX Dog is offline Sugar Community Member
    Join Date
    Jan 2011
    Posts
    45

    Default Re: Auto Generate Account Number?

    Hi Brian,

    The thread that Andopes pointed to is very useful and helped me to achieve a solution that works well for me and seems similar to your needs. It's based on standard sugar fields rather than custom fields.

    Take a look at this thread : http://www.sugarcrm.com/forums/showthread.php?t=68971

    Hope this helps a bit. Please bear in mind I am no sugar or php expert.

    All the best,

    LX Dog.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Developed: auto-generate IDs (GUIDs) within MySQL
    By mrmilk in forum Developer Help
    Replies: 8
    Last Post: 2011-04-14, 07:00 PM
  2. Replies: 1
    Last Post: 2009-11-03, 10:22 AM
  3. Auto incremental number
    By gjlando in forum Help
    Replies: 4
    Last Post: 2008-05-07, 06:49 PM
  4. Auto Generate Cases
    By donald in forum General Discussion
    Replies: 0
    Last Post: 2008-01-18, 08:12 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
  •