Results 1 to 4 of 4

Thread: Detail View Problem with Contacts

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

    Default Detail View Problem with Contacts

    Hi,

    If you have seen my other threads recently I have a logic hook that is checking data on the Client, this is setting a flag when a certain match is made. In my Detail View of the Contact I am checking this flag and running a Javascript.

    THis works fine, after the Javascript run and I continue some of my fields are showing a emtpy on the detail view but if I then refresh the page they appear.

    I have captured what is happening and you can see it at the link below.

    http://www.youtube.com/watch?v=4p6bJlRpdxM
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

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

    Default Re: Detail View Problem with Contacts

    If this helps,

    In the detail view in an IF Statment I have the following code

    PHP Code:
    $this->bean->alert 0;
    $this->bean->save(); 
    When I comment out the $this->bean->save(); I do not have the issue but then I lossthe functionality I was creating...

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

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

    Default Re: Detail View Problem with Contacts

    The save() call may be triggering the logic hooks (is there a way to tell the save to skip the logic hooks? This would be awesome!)

    If that's the case you may want to look at doing a direct db update instead of doing a save() call like:
    update contacts
    set fieldname = 'hello world'
    where id = $bean->id

    Ignore the syntax but that idea should work.

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

    Default Re: Detail View Problem with Contacts

    I will do that and let you know.

    How is the save() triggering a logic hook? What exactly is happening when the $this->bean->save(); is run.

    *********EDIT**********

    Tried the following
    PHP Code:
    $id $this->bean->id;
    $query "UPDATE contacts_cstm SET fdc_spouse_partner_alert_c = '0' WHERE id_c = '$id'"
    $bean->db->query($querytrue); 
    I get message etc before the query, and then the view is not loading - Do I need to run a query against that DB in a different way in hte detail view as I do in the edit view?

    **EDIT***

    I had to use this

    PHP Code:
    $this->bean->db->query($querytrue);
    instead of
    $bean
    ->db->query($querytrue); 
    Rgds
    Chris
    Last edited by chrislynch8; 2010-01-07 at 08:52 AM.
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. link to detail view from list view in the custom module problem
    By shamimwilson in forum Developer Help
    Replies: 10
    Last Post: 2009-12-24, 10:47 AM
  2. Accounts Sub-Panel in Contacts Detail View
    By ctigroup in forum Developer Help
    Replies: 3
    Last Post: 2008-10-17, 12:08 PM
  3. Contacts layout detail view (CE 5.0.0b)
    By markgill in forum Developer Help
    Replies: 9
    Last Post: 2008-05-14, 03:28 PM
  4. Campaign subpanel in Contacts detail view
    By therapyselect in forum Help
    Replies: 2
    Last Post: 2006-05-25, 04:33 PM
  5. Replies: 0
    Last Post: 2006-05-04, 01:27 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
  •