Hi Community,

 

We have this business requirement where we need to add duplicated communication options. For example, we can have two records for the same phone number.

 

When we try to add the same number, we receive the following error:

 

How can we turn off this validation/constraint? 

 

Thank you in advance.

Best Regards,

Pedro Pinheiro

Like 0

Like

2 comments

Hello Pedro,

You can add a few equal phone numbers as the communication options. All you need is to choose the different types for them:

Hi Anhelina,

 

Thank you for the response.

 

The idea here is to use the same type. For example, we need to create multiple duplicated instances for "Mobile Phone", because later on we will be using these records for our business logic. The number might be the same, but we have other attributes that have unique keys. We want to change this rule so it can be applied to those attributes.

 

Best Regards,

Pedro Pinheiro

Show all comments

Hi Community,

I have here a scenario below

 

Scenario:

I want to override Account communication options ( NUI ) detail for me to add field validation on its fields.

 

My replacing client module

 

But upon overriding setValidationConfig(), I got this error

How could I fix this? or is it posible to override setValidationConfig() inside a detail or the setValidationConfig() only works inside an edit page?

Thanks

 

Like 0

Like

2 comments

Give your code with a call setValidationConfig

But I think it's better case override  BaseCommunicationDetail and overriding addItem() 

And add your validator by analogy as there is added duplicate checking and number checking:

this.addColumnValidator("Number", newItem.validateField, newItem);
this.addColumnValidator("Number", newItem.checkCommunicationDuplicates, newItem);
 

:

Grigoriy,

Thanks Grigoriy, I got an idea.

Show all comments