AutoNumber in Documents

Hi there fellow SuiteCRM people :slight_smile:

I have used the following php code to successfully create Auto Number fields where I want them,
Howeever when I place the php code in the “Documents” folder, the php file does not seem to be picked up and therefore does not execute and create the autonumber.

Maybe I am not putting the php file in the correct location?
I am placing in the the following location


The Contents of the autoincrement.php is as follows

	 $dictionary['Documents']['fields']['CY_AUTONUM'] =  array(
            'name' => 'CY_AUTONUM',
            'vname' => 'Number',
            'type' => 'int',
            'readonly' => true,
            'len' => 11,
            'auto_increment' => true,
           'disable_num_format' => true,

	 $dictionary['Documents']['indices']['CY_AUTONUM_IND'] = array(
            'name' => 'CY_AUTONUM_IND',
            'type' => 'unique',
            'fields' => array('CY_AUTONUM'),

Any help appreciated


Which version of SuiteCRM is this?

Did you do a Quick Repair and Rebiuld? Did it report any errors in the logs?

And do you see a corresponding created file under custom/Ext/modules/Documents?