I'm trying to do a custom validation. I have a module in which there is a field that must be unique, so suitecrm must not allow you to create two records with that same field.
相关问题
- SuiteCRM API full authentication and login
- sugarCRM : creating relationship using module load
- Custom validation for unique custom field
- Search option is removed after adding Where condit
- Not able to login in SuiteCRM through REST API
相关文章
- Custom validation for unique custom field
- 你在哪里把你的自定义的切入点定义是什么?(Where do you place your custo
- Search option is removed after adding Where condit
- Not able to login in SuiteCRM through REST API
- How to fix “Specified key was too long; max key le
- SuiteCRM Make custom where condition query for pop
- Where do you place your custom entry point definit
- Adding javascript include using extension
Let's say you want to validate the sic_code Field in the Accounts module.
Following example was tested in SuiteCRM 7.11.2 using the Extension framework.
Go create a file in the
custom/Extension/modules/Accounts/Ext/Vardefs
folder.You can name the file
sugarfield_sic_code.php
.Inside of the file add this example snippet:
Now make sure sic_code is inside the editview (duh) and when you click SAVE you will be shown the alert + an error message below the field (in red)
That is the overall idea.
If you need something more elaborated doing Ajax, some templating, there is a great answer here on SO (for sugarcrm but should work for Suite)
prevent duplicate value using ajax in sugar crm