How Can I make the Account Field NOT Required When Creating an Opportunity?

Weā€™re using SuiteCRM 7.3.

Now that weā€™ve migrated our Accounts and Contacts to SuiteCRM, weā€™re starting to use some of the sales modules.

We ran into a problem which I canā€™t seem to correct. Iā€™m hoping one of you will be able to provide some assistance.

Creating an Opportunity ā€œrequiresā€ the user to create a new account or select an existing account before saving. Opportunities generally are in the early stages of a sale and hence do not have or need an account.

Account (the primary module) has a many to many relationship with Opportunities (the related module).

Since this is not a standard field type I am unable to access it from Studio, so Iā€™m looking for a minor code change in the custom/modules/opportunities directory somewhere I believe.

Iā€™ve found a few places in vardef files where Iā€™ll see something like:

array (
ā€˜nameā€™ => ā€˜account_nameā€™,
ā€˜displayParamsā€™ => array (
ā€˜requiredā€™ => true,
),
)

I thought changing this to

ā€˜requiredā€™ => false

would workā€¦ but it doesnā€™t, so there must be another placeā€¦ or multiple places to do thisā€¦

Any help would be greatly appreciated.

Thanks!

Hi,
I know for case, you must write in config_overide.php

Maybe for opportunity too ?

 $sugar_config['require_accounts'] = false; 

Regards

1 Like

Thank you, thank you, thank you!!

This did the trickā€¦

However, an unfortunate side affect is that it also turns off the Account Required in the Cases module but if this ok then this is a great fix.

VERY much appreciated. :slight_smile: :slight_smile: