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: