Remove one of Account's Quote Subpanels

Hi,

In Accounts, we have Quotes (Bill To) and Quotes (Ship To). Our client just wants one.

How can I remove one? I've worked out how to remove/hide a subpanel, but when it comes to quotes, I can only manage to hide both at the same time.

Thanks.

Gary.

  • Answering my own question here. Not sure if this is the best approach, but it worked for Sugar 7.

    ({
        // ./custom/modules/Accounts/clients/base/views/record/record.js

        extendsFrom: 'RecordView',

        initialize: function (options) {
            this._super('initialize', [options]);
        },

        bindDataChange: function() {
            this._super('bindDataChange');
       
            this.model.on("data:sync:complete", function(event, model) {
               
                // Record Loaded
                if (event === "read") {

                   // Hide Quotes (Ship To) Subpanel.
                   $("[data-subpanel-link='quotes_shipto']").hide();
                }

            }, this); // model.on data:sync:complete
           
        } // bindDataChange()
     
    })
  • This worked for me: 

    <?php

    // File: custom/Extension/modules/Accounts/Ext/Vardefs/remove_quotes_ship_to.php

    unset($dictionary['Account']['fields']['quotes_shipto']);