HOWTO: Make your MVC edit view class be able to be used for quick creates

sugarcrmdevelopers —  December 29, 2010 — 4 Comments

I just ran across this issue in the forums, which I’ve seen a number of times before. The issue is that you have defined a custom edit view class for your module, which works for normal edit view just fine. However, the code isn’t called for any of the “quick create” views, which are those AJAX driven ones that appear in subpanels and in the top navigation bar in the Pro and Enterprise versions. There’s a simple fix for this, in your edit view class, add the following..

public $useForSubpanel = true;

…and the logic in your custom edit view class will be executed.

4 responses to HOWTO: Make your MVC edit view class be able to be used for quick creates


    I don’t totally understand this issue. So, if I have module X which is the primary module and Y is the child module related to X. Then, in the subpanel of X, when I try to use quickcreate form to create a Y record, the view.edit.php of Y module should have the line of code below in its ViewEdit class?

        class YViewEdit extends ViewEdit {
    public $useForSubpanel = true;

            function YViewEdit(){

            function display() {
                //some logic here.


    Great post ! Thanks for the info. 

    Mukta Chourishi May 5, 2014 at 3:23 am

    This is not working for Quick Create.However is working for creatting record via subpanel.Can you please help.



    I have added $this->useForSubpanel = TRUE; in constructor in view.edit.php.
    But still my EditView and QuickCreate views are different.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s