Results 1 to 2 of 2

Thread: Data type for automatically incrementing value in field

  1. #1
    SPots is offline Member
    Join Date
    Jun 2007
    Posts
    5

    Default Data type for automatically incrementing value in field

    We are currently using SugarCRM 4.5.1d
    I would like to add a field in a module which autmotically increments based on the latest saved value (in fact, similar to a ticket number which increments automatically in a Help Desk tool).
    I could not find any data type that provides this functionality.
    Does anybody know how ?

    Thanks.

    Stef

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

    Default Re: Data type for automatically incrementing value in field

    there is a key 'auto_increment' => true in vardefs file. But, this will not work if you wouldnt set this field as primary key.

    if you are not going to use the field as a primary key, then you have to use tricks like setting new value through logic hooks 'before_save', for example.
    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Howto Change Custom Field Data Type
    By andreasw in forum General Discussion
    Replies: 9
    Last Post: 2011-10-12, 04:07 PM
  2. Custom Field data not saving
    By erick.wolfe in forum Help
    Replies: 0
    Last Post: 2006-09-21, 07:04 PM
  3. Replies: 0
    Last Post: 2005-08-12, 08:13 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
  •