Make Billing and Shipping Account and Contact required in Quote Header

Billing and Shipping Account and Contacts are related fields in Sugar Quote Header. Any ideas on how to make those fields required without custom code or logic hook.

Prefer an option just using Studio if possible.

  • Once those fields are not visible from Studio I'm afraid such customization has to be accomplished by extended vardefs.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • You cannot do that from Studio as the fields are related fields which are not editable in Studio.

    You could do it with code changes in custom/modules/Quotes/views/base/record/record.php by adding the required = true attribute to the four fields.

    But the easiest way to do it is to write a vardef extension as André Lopes proposed. It's just a fourliner which can be written e.g. to custom\Extension\modules\Quotes\Ext\Vardefs\_override_required_fields.php (I used the _override prefix to make sure it overwrites any other definition, the rest of the file name does not matter):

    <?php 
     $dictionary['Quote']['fields']['billing_account_name']['required'] = true;
     $dictionary['Quote']['fields']['shipping_account_name']['required'] = true;
     $dictionary['Quote']['fields']['billing_contact_name']['required'] = true;
     $dictionary['Quote']['fields']['shipping_contact_name']['required'] = true;
     

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH