Making a field required

Hello,

i’ve tried to make a custom field required, but i got "value exist ", searching on the net i found that it was a bug, so i’ve tried to make it through code
the change i made was in the file custom\Extension\modules\Opportunities\Ext\Vardefs\sugarfield_myfield_c.php and i added the line
$dictionary[ ‘Opportunity’] [ ’ fields’] [ ’ myfield_c’ ] [ ’ required’]= true;
i’m wondering if that change is persistent, have any one of you an answer?

I don’t think that making fields required is bugged, can you share your findings? what you did is persistent because you’re working on custom folder.

best regards

here is a capture of the bug,
i wanna ask also how to make a field (not a custom one) required with code, for example for the field industry in the module opportunities ?

what you want to do is already possible in studio in the fields section, check it out

best regards

yes i tried it through studio, but the message “invalide name, name already exists” doesn’t allow me to save the change. I want to do it with code, is there a way to do it?