Hello!
please help - Have a problem - can`t find a way how to auto-add unique number (like 1, 2, 3, 4 etc) to every new task created read all manual and helps, but found nothing about it. usually it realized in ServiceDesk software, but here I need it to have possibility make text links in other documents or mails (for example add text on a paper copy of document, written that details of work on this document was in task N3461, or in sms to colleague "look at the task N…)
Is it possible to make in Studio or module builder or need some development work?
thanks in advance
Looks to be an old sugar bug that is still present. Cases module has this increment logic running and may be able to be duplicated by manipulating/duplicating code. I would try to create a new module based on cases and increment an integer, not a string as you mentioned below. See link for more info.
https://community.sugarcrm.com/sugarcrm/topics/the-mistery-of-the-auto-incremented-integer-fields
Hi Alexey
Doing this is a 2 step process.
Step 1.) Use the Studio to add an new custom ( numeric ) field to the tasks module. The field type should be integer. Add this to your Detail View, but leave it out of the Edit View
Step 2.) For this you will need to access the MySQL database, you could use a tool like PHPMyAdmin. Edit the tasks_cstm table and look for the new field that you created in step 1. Set this field to type Auto Increment - Here’s some relevant docs: http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html
Once done; Then each new task created in the SuiteCRM system it will have a unique Task number.
Dear ricktimmis, tried to make it, but I cant find type auto increasement in the list - please help me to understand where I made a mistake.
I made new integer field
place it view form (only)
open phpmyadmin and find this new field
open type dropdown and can’t find auto increasement…
both pictures is in the attach. sorry for non-english lang in attach
can’t see an attach - trying to add again
Alexey, give it a try to http://www.sugarforge.org/projects/autoincrement/ if you don’t you can try this command within your mysql shell
ALTER TABLE your_table MODIFY COLUMN your_column INT auto_increment
Best regards
Hi Alexey
Sorry for the delay. but mike has covered how to do this. using MySQL command.
Hope it worked out for you
Cheers
Rick
hello! thanks for help
DTG Sugar Auto Increment Field not heped - it was installed, but this option not appeared as announced
now trying to find somebody who can explain me where to find “MySQL command”
Hi Alexey
The best way to tackle this problem is via teh MySQL Command Line.
The command you need is
ALTER TABLE tasks_cstm MODIFY COLUMN task_number_c INT auto_increment
Try not to get mis-directed looking elsewhere or using other tools, this is a very simple modification.
Look to my first post, re-read it, then look at this post., eveything you need is there
If you are still struggling to understand then maybe have a look for a “How to use MySQL Command Line” on Google, that will help make things easier to understand.
I hope this helps you
Thanks
Rick
found what i need, but it is some problem “#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key”
i created new field with other name, so, my command was
ALTER TABLE tasks_cstm MODIFY COLUMN unique_number_c INT auto_increment
Ответ MySQL: Документация
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
maybe you can advice what’s wrong?
adding screenshot
Hi Alexey
Ah yes, OK I know what’s wrong here.
MySQL will not allow you auto_increment field, becuase the ID filed is set as the primary key for that table. You need to change the primary key from ID to the task_number_c column.
Here is a link to a StackOverflow article about changing the primary key
http://stackoverflow.com/questions/6741042/mysql-alter-the-columns-of-my-primary-key
Don’t worry about ID on the task_cstm table as SuiteCRM auto generates its own index keys.
Hope this helps