Results 1 to 2 of 2

Thread: Logic Hook after_save fails due to Email Addresses save process

  1. #1
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Logic Hook after_save fails due to Email Addresses save process

    I have a huge beef with this one. Why do email addresses get save AFTER the contact is saved and all the logic hooks are processed? This is causing huge data integrity issues here. If a logic hook needs to do some work (which can't be avoided) it will cause the Email Addresses to never save thus wiping it out. The use case here is a logic hook that checks for dups in an external system and displays a form that calls Save again. (I've avoided other scenarios by NEVER calling bean->save() but instead going directly into the db)

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Logic Hook after_save fails due to Email Addresses save process

    Fixed it. In SugarEmailAddress.php getEmailAddressWidgetDuplicatesView() it was checking the $_POST var instead of $_REQUEST. The duplicate url is a get request.

    This would mean that the built-in Sugar Duplicate check would fail as well. The fix is to change all _POST references to _REQUEST

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cancel save in logic hook
    By eggsurplus in forum Developer Help
    Replies: 4
    Last Post: 2012-02-08, 09:37 AM
  2. after save logic hook for case number
    By tyagiakhil in forum Developer Help
    Replies: 4
    Last Post: 2008-01-09, 09:39 AM
  3. Adding Logic Hook to existing
    By Superman in forum Developer Help
    Replies: 2
    Last Post: 2006-12-18, 09:38 PM
  4. Logic Hook Question
    By swhitlow in forum Developer Help
    Replies: 1
    Last Post: 2006-06-04, 04:49 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
  •