Results 1 to 3 of 3

Thread: How to trigger logic hook from outside SugarCRM?

  1. #1
    Monkeyman is offline Senior Member
    Join Date
    May 2009
    Posts
    55

    Default How to trigger logic hook from outside SugarCRM?

    I have an order form on my site and want it to add new opportunity (order) in SugarSRM on user submit. I'm not a PHP-coder, but guess I can do a simple script to write data to Sugar DB.

    But how can I trigger logic hooks which run on new opportunity creation from Sugar interface?

    Or maybe I can launch a Sugar php-script which launches on new opportunity creation and add params to the query?
    Last edited by Monkeyman; 2009-05-31 at 06:21 PM.

  2. #2
    rcastro is offline Senior Member
    Join Date
    Dec 2009
    Posts
    41

    Default Re: How to trigger logic hook from outside SugarCRM?

    Hi, I have the same problem...did you find any solution to this???

    Thanks!

  3. #3
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to trigger logic hook from outside SugarCRM?

    Hello,

    When you create an external script, use class of the module you are entering the values to, and use save function, which will fire logic hooks as well.

    For example,

    PHP Code:
    require("PATH_TO_CLASS_FILE");
    $<
    CLASS_OBJECT> = new <CLASS_NAME>;
    // Loop through each field 
    $<CLASS_OBJECT>-><FIELD_NAME>;
    $<
    CLASS_OBJECT>->save(); 
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Logic Hook
    By Aespejo in forum Español
    Replies: 11
    Last Post: 2012-03-05, 11:27 AM
  2. how to add a logic hook
    By youssefmamdouh in forum Developer Help
    Replies: 3
    Last Post: 2011-09-06, 01:02 PM
  3. Trigger logic hook on Mass update
    By Mithun in forum Developer Help
    Replies: 7
    Last Post: 2010-10-08, 12:38 PM
  4. Help on my first logic hook.
    By amrutha in forum Developer Help
    Replies: 9
    Last Post: 2009-11-24, 01:29 PM
  5. Help with a Logic Hook
    By Iggby in forum Developer Help
    Replies: 6
    Last Post: 2009-01-29, 12:01 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
  •