Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Module Builder and Studio

  1. #1
    Bobhardyoyo is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    UK
    Posts
    59

    Default Module Builder and Studio

    Hi

    I need to edit a field that was created in Module Builder (I need to add the mass update option to one field), I've made changes to the module and added other fields in so I can just edit in the Module builder and redeploy as it will wipe out anything I've set up in studio (layouts etc) is there any way I can edit these fields using studio or another method?

    As a secondary point why aren't changes made in the studio saved back to the module, this would make more sense than being able to use one or the other method to add fields or make changes. When I first started setting sugar up I missed off the import tick in the module builder so when I went back and ticked the box and redeployed the module it wiped out all the changes I'd made through studio.

    Thanks
    Ed
    Version 5.5.1
    PHP 5.3.8
    MySQL 5.5
    IIS 6 Windows 2003 R2 SP2

  2. #2
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: Module Builder and Studio

    Quote Originally Posted by Bobhardyoyo View Post
    Hi

    I need to edit a field that was created in Module Builder (I need to add the mass update option to one field), I've made changes to the module and added other fields in so I can just edit in the Module builder and redeploy as it will wipe out anything I've set up in studio (layouts etc) is there any way I can edit these fields using studio or another method?

    As a secondary point why aren't changes made in the studio saved back to the module, this would make more sense than being able to use one or the other method to add fields or make changes. When I first started setting sugar up I missed off the import tick in the module builder so when I went back and ticked the box and redeployed the module it wiped out all the changes I'd made through studio.

    Thanks
    Ed

    Hi,

    After you deployed your module you can change and edit fields into custom\modules\Your_Module\

    Everything you change here is Upgrade Save.

    For Mass Update; what kind of field is that? You can use a code like this;
    PHP Code:
    <?PHP 
    $dictionary
    ['Your_Module']['fields']['Field_Name']['massupdate'] = false;
    ?>
    Save this file in custom\Extension\module\Your_Module\Ext\Vardefs\

    Goodluck
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  3. #3
    Bobhardyoyo is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    UK
    Posts
    59

    Default Re: Module Builder and Studio

    Hi

    Thanks for the suggestion, the Mass update field is the tick box in the Module Builder that I am assuming allows me to update a whole bunch of records in one field. I also need to reset the default on the same field but can't do that through studio, any idea how I do that?

    Thanks
    Ed
    Version 5.5.1
    PHP 5.3.8
    MySQL 5.5
    IIS 6 Windows 2003 R2 SP2

  4. #4
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: Module Builder and Studio

    Quote Originally Posted by Bobhardyoyo View Post
    Hi

    Thanks for the suggestion, the Mass update field is the tick box in the Module Builder that I am assuming allows me to update a whole bunch of records in one field. I also need to reset the default on the same field but can't do that through studio, any idea how I do that?

    Thanks
    Ed
    LOL, I know what the Mass update is I mean, for what fieldtype you want to use this Massupdate?
    By default the Mass Update only display fields whose type is 'Date', 'Enum' (dropdown or radio button), 'Bool' (check box) and Relate.

    I also need to reset the default on the same field but can't do that through studio, any idea how I do that?
    Can you send an screenshot of the situation? Then i can take a look at it.
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  5. #5
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: Module Builder and Studio

    I also need to reset the default on the same field but can't do that through studio, any idea how I do that?
    I think I know what ur mean;

    Go to Studio --> Module --> Fields --> Your_Field for default --> Default value = 'None'

    Hope this is what your looking for
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  6. #6
    Bobhardyoyo is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    UK
    Posts
    59

    Default Re: Module Builder and Studio

    Sorry, misunderstood the question, it is an ENUM (drop down field), I'm totally new to PHP and sugar, would you be able to give me an example of the code to use?

    Because the field was originally created in the Module Builder it seems I am unable to edit it in the Studio, as you can see from the attached image all of the editable options are greyed out.
    Attached Images Attached Images  
    Version 5.5.1
    PHP 5.3.8
    MySQL 5.5
    IIS 6 Windows 2003 R2 SP2

  7. #7
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: Module Builder and Studio

    Hi,

    To set massupdate use this code;

    $dictionary['Your_Module']['fields']['fieldname']['massupdate'] = true;


    Save this file as vardefs.ext.php in
    custom\Extension\module\Your_Module\Ext\Vardefs\

    see this thread to set your field to a default value
    http://www.sugarcrm.com/forums/showthread.php?t=40222
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  8. #8
    Bobhardyoyo is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    UK
    Posts
    59

    Default Re: Module Builder and Studio

    Thanks for the assistance, can I add both of the dictionary entries in to the same vardef files?

    E.g

    $dictionary['F1000']['fields']['f1000position']['massupdate'] = true;
    $dictionary['F1000']['fields']['f1000position']['default_value'] = '';

    Saved as Vardefs
    Last edited by Bobhardyoyo; 2009-07-14 at 02:54 PM. Reason: Added code
    Version 5.5.1
    PHP 5.3.8
    MySQL 5.5
    IIS 6 Windows 2003 R2 SP2

  9. #9
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: Module Builder and Studio

    Quote Originally Posted by Bobhardyoyo View Post
    Thanks for the assistance, can I add both of the dictionary entries in to the same vardef files?
    Yes you can.

    It will look something like this;

    PHP Code:
    <?PHP 
    $dictionary
    ['Your_Module']['fields']['your_field']['default_value'] = 'some_value';  
    $dictionary['Your_Module']['fields']['your_field']['massupdate'] = true;
    ?>
    Last edited by dekleinemedia; 2009-07-14 at 02:50 PM.
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  10. #10
    Bobhardyoyo is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    UK
    Posts
    59

    Default Re: Module Builder and Studio

    How do I get the vardef to apply? If I do a quick repair (it mentions doing this in the other post) the file gets deleted from the directory and nothing seems to change?
    Version 5.5.1
    PHP 5.3.8
    MySQL 5.5
    IIS 6 Windows 2003 R2 SP2

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2009-06-11, 11:48 AM
  2. Module Builder Vs Studio
    By jpotter in forum Developer Help
    Replies: 3
    Last Post: 2009-03-30, 03:04 PM
  3. Help with module builder and Studio
    By mjcr777 in forum Developer Help
    Replies: 2
    Last Post: 2008-05-28, 01:03 PM
  4. Studio and module builder help
    By glut in forum Help
    Replies: 2
    Last Post: 2007-12-21, 04:13 PM
  5. Replies: 0
    Last Post: 2007-11-21, 12:08 PM

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
  •