Results 1 to 4 of 4

Thread: to death question

  1. #1
    Meyer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    south africa
    Posts
    646

    Default to death question

    hi

    inleads module i created a custom field called "take_ownership" this is a checkbox field. Or maybee i need a button?

    Anyway. I need a logic hook that when evver a sales person clicks on this checkbox. it should automatically assign the lead to that person when lead is saved.

    this is still sugar 4.5.2 and please please i am not a programmer, learning to program still. so baby steps please

  2. #2
    sapmin is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    USA
    Posts
    69

    Default Re: to death question

    Why do you need a new field for this? Wouldn't it be safer for you and them if you teach them how to change the "assigned to".

    If you not a programmer, this might be much better. No sense making changes you don't have to.

  3. #3
    Meyer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    south africa
    Posts
    646

    Default Re: to death question

    thanks but not the answer i was looking for.

  4. #4
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: to death question

    Quote Originally Posted by Meyer View Post
    thanks but not the answer i was looking for.
    I would add a button in detail view and create a before save logic hook

    so in detailviewdefs do

    Code:
     array (
            'buttons' => 
            array (
              0 => 'EDIT',
              1 => 'DUPLICATE',
              2 => 'DELETE',
              3 => 
              array (
                'customCode' => '<input title="Assign" class="button" onclick="this.form.action.value=\'Save\';" type="submit" name="assign" value="Assign">',
              ),
    Then in your before save logic hook

    Code:
    global $current_user;
    
    if ($_REQUEST['assign'] == 'Assign') {
    			$bean->assigned_user_id = $current_user->id;
    
    		}
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. logic hook to death
    By Meyer in forum Help
    Replies: 1
    Last Post: 2009-02-09, 01:36 PM
  2. I'm new, i have some question.
    By smithveg in forum General Discussion
    Replies: 1
    Last Post: 2007-09-23, 10:21 AM
  3. White screen of death
    By vab3 in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-08-01, 03:39 AM
  4. PHP question
    By kbrill in forum Developer Help
    Replies: 3
    Last Post: 2006-08-06, 06:53 PM
  5. White Screen of Death
    By BRollins in forum Help
    Replies: 0
    Last Post: 2005-09-27, 04:40 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
  •