Sugarcrm 7 remove "required" attribute

Hello everyone !

On these threads, there are a lot of ways to make a field required, like adding a validationTask via record.js...

What i want :
But, i would like to do exactly the contrary : i would like to remove the required attribute of a field.
On the standard related field "account_name" created by Sugar on Cases module, for the standard relationship account_cases .
So, when i create or edit a Case, i have the Account Name field required every time. But this is quite ridiculous, because a Case is opened by a physical person, not an enterprise. So i would like to remove this obligation.

What i did :
I tried to add a custom vardef in case module :
/custom/Extension/modules/Cases/Ext/Vardefs/customVardef.php
with the following $dictionary code in it :

<?php$dictionary["Case"]["fields"]["account_name"]["required"] = false;
$dictionary["Case"]["fields"]["account_id"]["required"] = false;
?>

And did a QRR.

Aaaaannnd .. nothing happened.

I don't want to disable "required" for account_name on EVERY modules, ONLY on Cases.
So i don't want to write anything in config_override.php.
And this is a field created by Sugar, so I can't uncheck the "required" box via the Studio.

Please, could you help me with this ?

Thanks a lot :)
Parents Reply Children
No Data