Results 1 to 2 of 2

Thread: Workflow -- Logic Hooks

  1. #1
    robert.blasingame is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    24

    Default Workflow -- Logic Hooks

    I am running Sugar 5.0a and have created several workflow through workflow management. What I would like to do is to set up a workflow that creates a new "task" when an "opportunity" is created with a specific value in a field. I created this without problem and it functions properly, however what I need ultimately is to automatically populate the fields in the new task with the values in specific fields in the opportunity that created the Task.

    For instance:

    New Opportunity "Name": Test Opportunity
    New opportunity "Descripton": This is a test opportunity
    New opportunity "Assigned To": me

    I need the new task created with the "Subject" of the task being "Test opportunity", the Description of the tasl being "This is a test opportunity" and the task needs to be assigned to "Me".

    Any ideas on how to do this?

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Workflow -- Logic Hooks

    You should be able to extract the Name value from the opportunity, store it into a variable and then use that variable to apply the same value to the Name on the Task. An "after_save" hook should do the trick.

    $bean->name should give you the opportunity's "name" value which you can then do run through an IF and run the rest of your logic if true.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Logic Hooks Needed
    By kbrill in forum Developer Help
    Replies: 14
    Last Post: 2009-06-18, 10:04 AM
  2. logic hook problem with workflow and customizations
    By danisugar in forum Developer Help
    Replies: 9
    Last Post: 2008-03-05, 04:30 PM
  3. SOAP and logic hooks
    By dholmes in forum Developer Help
    Replies: 4
    Last Post: 2007-10-29, 10:41 PM
  4. Replies: 0
    Last Post: 2006-01-24, 09:09 AM
  5. HowTo: deliver Logic Hooks with module package?
    By Superman in forum Developer Help
    Replies: 2
    Last Post: 2005-11-23, 01:42 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
  •