Suite CRM Auto increment number on Accounts

I tried several answers from this forum. But i can’t implement them to the present version of Suite CRM.

Here is the one i tried last and stuck for further clarification.

add a new file in custom/Extension/modules/yourmodule/Ext/Vardefs e.g. autoincrement.php with the following :

<?php
	 $dictionary['YOUR_MODULE']['fields']['NAME_OF_AUTO_INC_FIELD'] =  array(
            'name' => 'NAME_OF_AUTO_INC_FIELD',
            'vname' => 'LBL_LABEL_OF_AUTO_INC_FIELD',
            'type' => 'int',
            'readonly' => true,
            'len' => 11,
            'auto_increment' => true,
           'disable_num_format' => true,
        );
?> 

and also add unique index for the field in that file

<?php
	 $dictionary['YOUR_MODULE']['indices']['NAME_FOR_INDEX'] = array(
            'name' => 'NAME_FOR_INDEX',
            'type' => 'unique',
            'fields' => array('NAME_OF_AUTO_INC_FIELD'),
        );
?>

Run a Quick Rebuild and Repair in Admin -> Repair and execute the changes.

after that it shows an empty text box, there it iterates automatically. But i want to show the next auto increment number here in this Add new customer page itself.

Hi,
This plugin allows to do acheive above without coding and auto increment feature can be added to any module or even custom module supported

Did you add this field to the views in Studio?

If you create an int field and edit the field definition in DB to set the auto increment flag, it will work as expected since mysql will handle it.

Where do you add the unique index for the field in that file? I have autoincrement.php done. I just cant figure out where I am supposed to put this code:

<?php
	 $dictionary['YOUR_MODULE']['indices']['NAME_FOR_INDEX'] = array(
            'name' => 'NAME_FOR_INDEX',
            'type' => 'unique',
            'fields' => array('NAME_OF_AUTO_INC_FIELD'),
        );
?>

Do i create a new file? Or is there a file I can write this in?

What is your Field Name and How does its definition look like? Which Module have you added it ?

I will be doing this in a custom module I have created. With a field name of sample_id_c

I am not sure what the definition means. Sorry I am still learning this. I appreciate your help!