Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Having Trouble extending vardefs for Accounts

  1. #1
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Having Trouble extending vardefs for Accounts

    Hi,

    I want to extend my vardefs to add a field to the Mass Update of Accounts.

    In custom/Extension/modules/Accounts/Ext/Vardefs/ I created a file called vardefs.ext.php

    And I included the Following

    PHP Code:
    <?php
    $dictionary
    ['Accounts']['fields']['pr_account_status_c']['massupdate'] = true;
    ?>
    I rebuild the extension but nothing changed on the Mass Update for Accounts. I found another thread here that had Account instead of Accounts for I tried that it rebuilt the Extensions and that didn't work either.

    In the custom/Extension/modules/<ModuleName>/Ext/Vardefs/ I have two other files from Module updates that I installed. Would these affect my vardefs.ext.php???

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

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

    Default Re: Having Trouble extending vardefs for Accounts

    Quote Originally Posted by chrislynch8 View Post
    Hi,

    I want to extend my vardefs to add a field to the Mass Update of Accounts.

    In custom/Extension/modules/Accounts/Ext/Vardefs/ I created a file called vardefs.ext.php

    And I included the Following

    PHP Code:
    <?php
    $dictionary
    ['Accounts']['fields']['pr_account_status_c']['massupdate'] = true;
    ?>
    I rebuild the extension but nothing changed on the Mass Update for Accounts. I found another thread here that had Account instead of Accounts for I tried that it rebuilt the Extensions and that didn't work either.

    In the custom/Extension/modules/<ModuleName>/Ext/Vardefs/ I have two other files from Module updates that I installed. Would these affect my vardefs.ext.php???

    Rgds
    Chris
    Hi Chris,

    You tried to edit this field in Studio? There you can set massupdate enabled for your field.

    Otherwise;

    When you go to your sugar folder modules\Accounts you find the vardefs.php. In here you can see that $dictionary['Account'].
    Therefore you have to add this line in vardefs.ext.php;

    $dictionary['Account']['fields']['pr_account_status_c']['massupdate'] = true;

    Do a Quick Repair and Rebuild and it should have to work. You have Developer Mode enabled?
    Last edited by dekleinemedia; 2009-08-05 at 01:01 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

  3. #3
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Having Trouble extending vardefs for Accounts

    Hi Thanks for teh reply.

    Yes I have developer mode enabled.

    I found that I was able to set the custom field to appear in the Mass Update in Studio, but I still can't get the vardefs.ext.php to work. I will use the studio way but I would like to get to the bottom of this issue.

    I on version 5.0.0j Pro
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  4. #4
    shamimwilson is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    Banglore India
    Posts
    235

    Default Re: Having Trouble extending vardefs for Accounts

    hi,

    What is the type of the field that you are trying to mass update.
    generally mass update works for the dropdown type or date type fields.

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

    Default Re: Having Trouble extending vardefs for Accounts

    Hi Chris,

    Have you tried to add an other custom field to your Massupdate?
    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
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Having Trouble extending vardefs for Accounts

    Hi Thanks for the replies.

    The field is a custom dropdown. I haven't tried to add another field yet. I will do that now.

    But I also had trouble trying to create a custom vardefs for the opportunity module that made the Account field not required, but this didn't work either.

    I will try to do another field and see what happens

    Thanks
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  7. #7
    eescribano's Avatar
    eescribano is offline Senior Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    85

    Default Re: Having Trouble extending vardefs for Accounts

    Remember that the code is not the code you worte
    PHP Code:
    <?php
    $dictionary
    ['Accounts']['fields']['pr_account_status_c']['massupdate'] = true;
    ?>
    but this code
    PHP Code:
    <?php
    $dictionary
    ['Account']['fields']['pr_account_status_c']['massupdate'] = true;
    ?>
    Is Account in singular no Accounts as dekleinemedia said...
    Elisabeth Escribano
    Webdeveloper

    MADCAP verademing in ict

    e.escribano@madcap.nl

    Schapedrift 89
    3371 JJ Hardinxveld-Giessendam
    Netherlands
    Tel 088 99 088 99
    Fax 088 99 088 98

    www.madcap.nl

  8. #8
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Having Trouble extending vardefs for Accounts

    So tried another field and nothing. I also make a mistake in the vardefs I put in => instead of = to see if it was being read and it caused an error.

    So what else can I try to do from here to see if it works is there something simple I can do like hide a normal field ?

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  9. #9
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Having Trouble extending vardefs for Accounts

    Quote Originally Posted by eescribano View Post
    Remember that the code is not the code you worte
    PHP Code:
    <?php
    $dictionary
    ['Accounts']['fields']['pr_account_status_c']['massupdate'] = true;
    ?>
    but this code
    PHP Code:
    <?php
    $dictionary
    ['Account']['fields']['pr_account_status_c']['massupdate'] = true;
    ?>
    Is Account in singular no Accounts as dekleinemedia said...
    I tried this also in my first thread. I had it wrong first and found a thread that said it must be Account

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  10. #10
    shamimwilson is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    Banglore India
    Posts
    235

    Default Re: Having Trouble extending vardefs for Accounts

    Hi,
    in the custom/extension/module/modulename/Ext/Vardefs/vardefs.ext.php

    add the field in the following formate


    $dictionary['modulename']['fields']['account_list1_c'] =
    array (
    'name' => 'account_list1_c',
    'vname' => 'LBL_ACCOUNT_LIST1_C',
    'type' => 'enum',
    'options'=> 'Cust_Account_list',
    'len' => '100',
    'audited'=>true,
    'merge_filter' => 'enabled',
    'source' => 'non-db',
    'massupdate' => true
    );

    rebuild extension.

    hope this will help

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extended vardefs vardefs.ext.php vanishes after deploy
    By amrutha in forum Developer Help
    Replies: 3
    Last Post: 2011-06-10, 12:13 PM
  2. Trouble uploading to Accounts
    By JTF2L in forum Help
    Replies: 6
    Last Post: 2008-10-13, 03:37 PM
  3. Replies: 6
    Last Post: 2008-05-06, 08:10 AM
  4. Trouble exporting accounts
    By AlexT in forum General Discussion
    Replies: 0
    Last Post: 2006-08-17, 02:10 AM
  5. Trouble Importing accounts
    By Davey78 in forum Help
    Replies: 9
    Last Post: 2006-02-25, 02:16 AM

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
  •