[Vtigercrm-developers] make a field unique

lucia digirolamo l.digirolamo at websonica.net
Thu Oct 20 15:16:59 GMT 2016


I've managed to do it by copying the edit.js and detail.js from Account 
and adding the checkDuplicate function in Record.php and actions folder 
of Project module.
However when I try to add an already existing project, the message in 
the popup still says 'Organizations' instead of 'project' and if I try 
to change the code I've copied (substituting 'account' with 'project'), 
then it doesn't work anymore.

What am I missing?



On 14/10/2016 15:15, Alan Lord wrote:
> On 14/10/16 14:02, lucia digirolamo wrote:
>> Hi, I need the name of my projects in the Project module to be unique..
>> basically what I need is that when I enter a name  (in projects) that
>> already exists, I cannot save the record and some message appears saying
>> that the name already exists (i'm using vtiger 630, by the way)
>>
>> can somebody tell me how can I achieve this?
>
> Look at the way the Account Name is handled in 
> layouts/vlayout/modules/Accounts/resources/{Detail.js,Edit.js}
>
> HTH
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/
>



More information about the vtigercrm-developers mailing list