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

Thread: Auditable fields - once more.

  1. #1
    dusker is offline Senior Member
    Join Date
    Nov 2008
    Posts
    31

    Default Auditable fields - once more.

    Hi Guys,

    i've been searching the internet and these forums, for some info on how to make some standard fields auditable.
    For example, what i want to do is, in Accounts module, set Name, Industry, Type, Team and Assigned to fields auditable, so all changes on all records regarding these fields will be logged in a change log.
    Obviously Studio module does not work here.

    i've tried several solutions like this one:
    http://www.sugarcrm.com/forums/showt...ighlight=audit
    and several other ones but i had no luck at all.

    Could anyone please explain how to set these fields to auditable?

    greetings
    peter

  2. #2
    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: Auditable fields - once more.

    Hi Peter

    Did you click on Rebuild Extension after saving the file?
    Let me know the content of the file you created to perform this customization.

    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.

  3. #3
    dusker is offline Senior Member
    Join Date
    Nov 2008
    Posts
    31

    Default Re: Auditable fields - once more.

    Hi,

    that's what i have in custom vardefs file:

    PHP Code:
    $dictionary['Account']['fields']['account_type']['audit'] = true
    (i wanted to do it firstly for one field only which is account type)

    and i did do rebuild extensions afterwards and the log is still insensitive for changes on account type.

    thanks for help in advance

    greetings
    peter

  4. #4
    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: Auditable fields - once more.

    Quote Originally Posted by dusker
    PHP Code:
    $dictionary['Account']['fields']['account_type']['audit'] = true
    Hi Peter

    Make sure the file custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php had been created containing this piece of code.

    Regards
    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.

  5. #5
    dusker is offline Senior Member
    Join Date
    Nov 2008
    Posts
    31

    Default Re: Auditable fields - once more.

    i've saved it under:
    custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php
    i've rebuilt extensions and it still doesn't work.

    i'm running on sugar 5.1.0a

  6. #6
    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: Auditable fields - once more.

    You need to save it into custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.ext.php.
    custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php is automatically reloaded when running Rebuild Extension.

    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.

  7. #7
    dusker is offline Senior Member
    Join Date
    Nov 2008
    Posts
    31

    Default Re: Auditable fields - once more.

    ok, i have saved it under custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.ext.php
    rebuilt extensions afterwards, and still no go.
    when i open view change log it doesn't list my fields

  8. #8
    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: Auditable fields - once more.

    Do the following:

    1. Implement the code into custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.ext.php
    2. Go to Admin -> Repair -> Rebuild Extension
    3. Open the file custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php and make sure your code had being copied to this file;
    3.1. If not, change the permission/owner of the custom folder to allow access to user under which apache is running;
    3.2. Repeat steps 2 and 3.
    4. Go to Change Log to make the field is there.

    Regards
    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.

  9. #9
    dusker is offline Senior Member
    Join Date
    Nov 2008
    Posts
    31

    Default Re: Auditable fields - once more.

    OK, i did all exactly as You wrote and still no good.

    1. i implemented the code in custom/Extension/modules/Accounts/Ext/Vardefs/vardefs.ext.php
    2. i rebuilt extensions
    3. i've checked custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php and the code was there
    4. i tried to change something in accounts module and no changes are logged in log. The top of the log window still says 'Fields audited in this module: Parent Account ID, team id, phone office, name, assigned user'

    i also did a little test to check if sugar is even trying to open this file. I put in the following into the custo vardefs fule:

    PHP Code:
    $dictionary['Account']['fields']['qertqerqwre']['audit'
    and it throws an error that it cant find such field. So it's definately parsing that file.

  10. #10
    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: Auditable fields - once more.

    My bad!!!

    The correct is:

    PHP Code:
    $dictionary['Account']['fields']['account_type']['audited'] = true
    I hope this works now!

    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.

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. Replies: 0
    Last Post: 2008-06-17, 06:54 PM
  2. Validate Readonly fields
    By Iggby in forum Developer Help
    Replies: 3
    Last Post: 2008-04-25, 12:15 AM
  3. Custom Fields Not Saving Data
    By vantagejuan in forum Help
    Replies: 1
    Last Post: 2008-04-14, 11:17 PM
  4. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  5. Adding Custom Fields to a layout (3.5.1)
    By pSouper in forum Help
    Replies: 3
    Last Post: 2006-07-09, 02:10 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
  •