Question

How to remove Contact/Account validation on Case?

Hello Community,

There is an out-of-the-box Creatio behaviour by which, whenever a Case is saved without a Contact and Account filled in, a validation pops up on saving the Case record that says, "Please fill in either Account or Contact to proceed".

Can anyone help me remove this validation?

Thanks in advance.

Like 0

Like

2 comments
Best reply

Dear Rahul, 

According to the application logic, each case has to have selected contact or an account. They are required by default and this logic is implemented with code, regardless the section wizard settings. 
It can be changes in CasePage schema of the Case package by overriding 
“validateAccountOrContactFilling” function. 

In order to override the “validateAccountOrContactFilling” function please do the following:

1. Create a replacing client module of the “CasePage” schema. It is possible to use section wizard for it.
2. Add the following code to the “methods” property:

validateAccountOrContactFilling : function(callback,scope){
            var result = {
                        success: true
            };
            callback.call(scope || this, result);
}

Please note the method should return the “result” object that contains the “success” property with the “true” value. This will allow the “result” object to successfully complete a validation in the "ValidateResponse" method

Kind regards,
Roman

Dear Rahul, 

According to the application logic, each case has to have selected contact or an account. They are required by default and this logic is implemented with code, regardless the section wizard settings. 
It can be changes in CasePage schema of the Case package by overriding 
“validateAccountOrContactFilling” function. 

In order to override the “validateAccountOrContactFilling” function please do the following:

1. Create a replacing client module of the “CasePage” schema. It is possible to use section wizard for it.
2. Add the following code to the “methods” property:

validateAccountOrContactFilling : function(callback,scope){
            var result = {
                        success: true
            };
            callback.call(scope || this, result);
}

Please note the method should return the “result” object that contains the “success” property with the “true” value. This will allow the “result” object to successfully complete a validation in the "ValidateResponse" method

Kind regards,
Roman

Roman Brown,

Thank you Roman!
This works.

Show all comments