Results 1 to 5 of 5

Thread: Fix: Module Builder: Subpanel: does not auto-select after create

  1. #1
    nikemir is offline Member
    Join Date
    Jun 2006
    Posts
    8

    Thumbs up Fix: Module Builder: Subpanel: does not auto-select after create

    If you using Module Builder to create new modules, and having problems making the Subpanel auto-add the new entry in the Subpanel list,
    or in simple terms:
    1. "Create" from subpanel
    2. "Save"
    3. No entry in subpanel list (demmit!)
    4. "Select" (very inconvenient)
    5. Click on the name of the new entry
    6. Entry appears in subpanel list
    Then the fix is right below, following my example:

    Parent module: Tickets
    Subpanel module: StrategyTask

    in modules/StrategyTask/Save.php, add the coloured line:

    $sugarbean = populateFromPost('', $sugarbean);
    $sugarbean->tickets_id=$_POST[return_id]; //tickets is the object name of the parent module

    in modules/StrategyTask/StrategyTask.php, add the coloured line:

    //BUILDER:START of relationship fields
    'tickets_id'=>'tickets', //tickets is the object name of the parent module
    //BUILDER:END of relationship fields
    Now you can:
    1. "Create" from subpanel
    2. "Save"
    3. Entry appears in subpanel list! (YAY!)

    It works for me perfectly, like the original SugarCRM modules.
    I hope this works for all of you, it took a portion of my brain cells and 3 whole days going thorugh the crazy arrays.
    Goodluck!

    I am currently using:
    -----------------------------
    Operating system type and version: Windows XP SP2
    Sugar Suite version: 4.2.0d
    Module Builder version: 3.1
    Simple Template version: 3.1
    Webserver type and version: Apache 2.0.54
    PHP version: 5.0.4
    MySQL server version: 4.1.13a

  2. #2
    nikemir is offline Member
    Join Date
    Jun 2006
    Posts
    8

    Default Re: Fix: Module Builder: Subpanel: does not auto-select after create

    MORE DETAILED VIEW + CORRECTION

    Parent module: Tickets
    Parent object: ticket
    Parent table: tickets
    Subpanel module: StrategyTasks
    Subpanel object: strategytask
    Subpanel table: strategytasks

    in modules/StrategyTask/Save.php, add the coloured line:

    $sugarbean = populateFromPost('', $sugarbean);
    $sugarbean->ticket_id=$_POST[return_id]; //ticket is the parent object name

    in modules/StrategyTasks/strategytask.php, add the coloured line:

    //BUILDER:START of relationship fields
    'ticket_id'=>'tickets', //ticket is the parent object name whereas tickets is the parent table name
    //BUILDER:END of relationship fields

  3. #3
    jburgam is offline Junior Member
    Join Date
    Jan 2007
    Posts
    1

    Thumbs up Re: Fix: Module Builder: Subpanel: does not auto-select after create

    Thank you! it works like a charm...

  4. #4
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Fix: Module Builder: Subpanel: does not auto-select after create

    nikemir, any way we can get this submitted as a contribution so we all can share in the goodness?

    Thanks,

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  5. #5
    flinkas is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    13

    Default Re: Fix: Module Builder: Subpanel: does not auto-select after create

    I'm Using Sugarcrm 4.2.1 AND Module Builder 3.5.1.

    The problem continues... Someone fix it!?

    [ ]'s

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •