Results 1 to 9 of 9

Thread: Customizing Mass Update in 5.0

  1. #1
    bstonehill is offline Sugar Community Member
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    98

    Default Customizing Mass Update in 5.0

    Okay, hopefully this is my last issue for awhile. I have a custom module (Equipment) that is related to Accounts and another custom module (Purchase Orders). I need to be able to assign equipment to an account and a purchase order using mass update. How would I go about this in 5.0?

    I also need to remove unwanted fields from massupdate. In the past I added a "massupdate => 'false';" in vardefs.php for the field I wanted to remove. That does not seem to work in 5.0 (unless I've just got the wrong vardefs file, but I'm pretty sure I do).
    Is there a different way to accomplish this in 5.0?

    Thanks

  2. #2
    bstonehill is offline Sugar Community Member
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    98

    Default Re: Customizing Mass Update in 5.0

    Okay, I've read everything I can find on this subject. I need to remove most of the mass update fields under accounts but the ones I need to disable are not listed in modules/accounts/vardefs.php, in fact it appears that only relational type fields are there.

    For the industry fieId for example, I noticed that in studio mass update is unchecked and I obviously cannot edit it because it's not a custom field. Even though it's unchecked it still shows up in massupdate and it is one of the fields that is not listed in vardefs.php. I tried adding an entry for it manually but then that causes errors when I run a repair.

    I'm running 5.0.0e.

    I also need to be able to either add a relate field (like assigned_user) to mass update or get the multiple select checkboxes under the select popup on a custom module. They are available in all of the default modules but none of the custom ones. Is this deliberate or a bug and can it be manually added?
    Last edited by bstonehill; 2008-06-05 at 04:07 PM.

  3. #3
    stabde is offline Junior Member
    Join Date
    Jun 2008
    Posts
    1

    Default Re: Customizing Mass Update in 5.0

    hi,
    Ihave the same problem .. i would like to do the same thing.. nobody can help ??

  4. #4
    nikidinsey is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    22

    Default Re: Customizing Mass Update in 5.0

    I'd like to bump this month old thread.

    This is really rather odd - with other modules you can manage the 'massupdate' => true/false quite easily.

    With Accounts this doesn't seem to be the case.

    modules/Accounts/vardefs.php doesn't contain 'industry' or 'account_type' at all yet both end up in the final Mass Update panel.

    After a bit of digging I found the only mention of industy and account_type was in the cache in the following files:

    /cache/modules/modulebuilder/Accountsvardef.php
    /cache/modules/Accounts/Accountsvardef.php

    After playing about modulebuilder's version doesn't seem to do anything - removing it doesn't regenerate it when browsing to the page, I suspect (but haven't tried) this will regenerate when changing stuff in the module builder.

    The accounts' version does effectively work if edited but if you delete the file and browse to the page it regenerates back to the original configuration (i.e. the fields return to mass update)

    I can't for the life of me see where to properly remove these vardefs from the Accounts module - any help appreciated!

    Thanks a lot

    Niks
    Last edited by nikidinsey; 2008-08-29 at 01:06 PM.

  5. #5
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Customizing Mass Update in 5.0

    Hi all

    You can create an extended vardefs for Accounts (custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.ext.php)
    Inside this file you can redefine the massupdate attribute to the Accounts fields.
    After that you need to Repair Extension.
    The fields whose massupdate is checked as false will no longer be displayed into MassUpdate form.
    It also works for relate fields (Equipments and Purchase Order).

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  6. #6
    nikidinsey is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    22

    Default Re: Customizing Mass Update in 5.0

    Hi thanks andopes, that did the trick.

    I created the file as you said and used an existing vardefs.ext.php file for guidance. My code ended up as:

    PHP Code:
    <?php
    // Added to remove massupdate fields
    $dictionary["Account"]["fields"]["account_type"] = array (
       
    'name' => 'account_type',
       
    'vname' => 'LBL_TYPE',
       
    'type' => 'enum',
       
    'options' => 'account_type_dom',
       
    'len' => 50,
       
    'comment' => 'The Company is of this type',  
       
    'massupdate' => false,
    );

    $dictionary["Account"]["fields"]["industry"] = array (
       
    'name' => 'industry',
       
    'vname' => 'LBL_INDUSTRY',
       
    'type' => 'enum',
       
    'options' => 'industry_dom',
       
    'len' => 50,
       
    'comment' => 'The company belongs in this industry',
       
    'merge_filter' => 'enabled',
       
    'massupdate' => false,
    );

    ?>
    After this rebuilt the extensions and everything works correctly.

    Thanks a lot!

    Niks

  7. #7
    maus is offline Senior Member
    Join Date
    Aug 2008
    Location
    Netherlands, Amsterdam
    Posts
    80

    Default Re: Customizing Mass Update in 5.0

    This file already exists in: custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.ext.php

    and it says //WARNING: The contents of this file are auto-generated

    when i add the code my sugarcrm doesn't work anymore.

    could someone tell me why this is.
    Last edited by maus; 2008-10-01 at 12:42 PM.

  8. #8
    sid606 is offline Member
    Join Date
    Jun 2011
    Posts
    8

    Default Re: Customizing Mass Update in 5.0

    You can accomplish this also with putting 'massupdate' => false, in vardefs.php in module/{name}/vardefs.php in the field you want not to be shown.

  9. #9
    whitewidow is offline Sugar Community Member
    Join Date
    Jun 2010
    Posts
    68

    Default Re: Customizing Mass Update in 5.0

    Is it possible to use this method to add mass update for custom fields?

    e.g. I have a custom checkbox field added to the accounts module (saved in accounts_cstm) that I would like to be set for Mass Update in the list view of the accounts module.

    I have created a custom Vardef.ext.php file in : custom\extension\modules\accounts\ext\vardefs\vard efs.ext.php

    I have established that the 'Options' value is only for selecting which drop-down to assign to it, but I am not sure if you can change this to be true/false or something? Also, does the 'Type' field need to be changed to something else? At present it's set to 'enum'. Am I right in assuming that there are various different 'types'? What is the correct 'type' for a checkbox?

    Appreciate any help on this

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: 2007-06-16, 02:20 PM
  2. Mass Update Customisation
    By duncanb in forum Developer Help
    Replies: 4
    Last Post: 2007-05-16, 06:17 AM
  3. Mass Update won't work!
    By rsantiago in forum Help
    Replies: 6
    Last Post: 2006-08-18, 02:54 AM
  4. Customizing mass update with Studio
    By george_bbch in forum General Discussion
    Replies: 0
    Last Post: 2006-05-11, 04:52 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
  •