How do you bypass the requirement to create a Revenue Line Item before you can save an Opportunity?

Customer uses the Revenue Line Items, but doesn't want to be forced to create one in order to save the Opportunity, as this does not fit their process.  They want to create and save the Opp, then come back later and either enter or import the individual RLI records.

The admin section for Opportunities does not offer the RLI to be optionally added later.  The only choices are use the RLI or don't use RLI and then they go away entirely.

Is there a way anyone has found to bypass the requirement that you must create at least one RLI?

Parents
  • Guess no one has run into this situation yet?

    Anyone from Sugar Engineering that reads this stuff and can help?  At least a hint?  This is a big deal for this customer, and they are refusing upgrade to 7.6 until this is solved.

  • You can create a custom controller for the create-actions and record views that in turn would allow you eliminate the check for Revenue Line Items that is performed when you create a new opportunity and/or view an existing opportunity.

    The code for those would look something like this, respectively:

    create-actions.js

    ({

        extendsFrom: 'CreateView',

       

        getCustomSaveOptions: function(options) {

            this.createdModel = this.model;

            // since we are in a drawer

            this.listContext = this.context.parent || this.context;

            this.originalSuccess = options.success;

            var success = _.bind(function(model) {

                this.originalSuccess(model);

            }, this);

            return {

                success: success

            };

        },

        _dispose: function() {

            this._super('_dispose');

        }

    })

    record.js

    ({

        extendsFrom: 'RecordView',

        initialize: function(options) {

        this._super('initialize', [options]);   

        },

        _dispose: function() {

            this._super('_dispose');

        },

    })

Reply
  • You can create a custom controller for the create-actions and record views that in turn would allow you eliminate the check for Revenue Line Items that is performed when you create a new opportunity and/or view an existing opportunity.

    The code for those would look something like this, respectively:

    create-actions.js

    ({

        extendsFrom: 'CreateView',

       

        getCustomSaveOptions: function(options) {

            this.createdModel = this.model;

            // since we are in a drawer

            this.listContext = this.context.parent || this.context;

            this.originalSuccess = options.success;

            var success = _.bind(function(model) {

                this.originalSuccess(model);

            }, this);

            return {

                success: success

            };

        },

        _dispose: function() {

            this._super('_dispose');

        }

    })

    record.js

    ({

        extendsFrom: 'RecordView',

        initialize: function(options) {

        this._super('initialize', [options]);   

        },

        _dispose: function() {

            this._super('_dispose');

        },

    })

Children