Search code examples
triggerssugarcrmauto-generate

Want to display an auto generated id in a custom module of SugarCRM


I am using Sugar Enterprise 6.4.0 and want to display a uneditable field in a custom module Edit and Detail view. This id need to be generated automatcially and need to be displayed in the interface when user click to create a new record in the custom module.

Because i am new to Sugar can anyone help me out in performing this task. Any ideas?


Solution

  • You can set the readonly property on the field itself in the vardefs for the module...

    $dictionary['<<module>>']['fields']['<<fieldname>>']['readonly'] = true;
    

    Then, add some logic in the custom/modules/<>/views/view.edit.php which does the autogeneration for you.