我尝试在两个联系人合并为一个之前添加文档编号验证,因为在合并过程中用户可以修改该字段并输入不正确的文档编号。
在 SugarCRM 文档中,仅指在创建或记录 View 上添加验证任务,而不是在合并 View 上添加验证任务。
有人已经做过类似的事情了吗?
最佳答案
最后我覆盖了merge-duplicates
View (在custom/modules/Contacts/clients/base/views/merge-duplicates/merge-duplicates.js ),在 this.clearValidationErrors
之后的 triggerSave
事件中,我添加了验证:
this.clearValidationErrors (this.getFieldNames());
// My validations, I use this two variable to perform it:
newRecord = this.primaryRecord.attributes;
newRecordChanges = this.primaryRecord.changed;
关于javascript - 糖CRM : Add validation task before merge contacts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42414189/