Hi there,
I'm a newbie on SugarCRM and I bought the companion guide.
I have a question about Logic Hooks and Worflows.
It is right to say that in CE of SugarCRM process are managed by Logic Hooks and in PRO edition with Workflows?
Hi there,
I'm a newbie on SugarCRM and I bought the companion guide.
I have a question about Logic Hooks and Worflows.
It is right to say that in CE of SugarCRM process are managed by Logic Hooks and in PRO edition with Workflows?
All SugarCRM flavors supports Logic Hooks.
Only commercial flavors (PRO and ENT) supports Work Flows.
There are some requirements easier to implement by Work Flows, but there are some other much easier to implement by Logic Hooks.
In short words, there are requirements you can implement by either Logic Hooks or Work Flows.
I hope I answered your question.
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Hi and thanks for the answer!
So what's the real difference betweeen the two objects?
Can I create worflows with Logic Hooks?
A workflow is created using the GUI provided to you by SugarCRM. Logic Hooks are implemented in code.
A workflow is actually a logic hook that has been autogenerated for you.
So, a logic hook can do everything a workflow rule could (since workflow rules generate a logic hook).
What I do is try to implement everything I can in a workflow rule... If i can't because of some limitation, such as no way to do OR conditions on criteria or run into other various limitations... can't think of them off hand... I then custom code a logic hook.
Sugar 6 Pro, On-Site (Apache 2.0, MySQL 5.1, PHP 5.2.6)
My SugarForge Projects:
Email To Sugar - Archive emails in any mail client by adding a BCC line.
Task Dashlets Plus- Adds custom dashlets for: tasks assigned to me by others, delegated tasks, overdue tasks, and open tasks past start date
www.blakerobertson.com
Would either a workflow or a logic hook allow me to trigger an action to occur based upon a date field in a contact record.
Two specific examples:
1. 10 days prior to customer's birthday, automatically send an email to vendor that will instruct vendor to send a birthday gift to the client
2. for a doctor's office, send the patient an automated phone call one day prior to date of next exam (custom field in contact table)
None of the documentation I've read so far indicates a logic hook can be triggered by dates in the contact record.
Am I missing something? Is there some sort of plug-in that would provide this type of functionality?
THANKS IN ADVANCE!!!![]()
Hello,
What I think for logic hooks and workflows
1. logic hook are event functions which are triggered by Sugar .
some of events are
before save , after save , before delete , after delete etc
you can see a full list of such events at include/utils/LogiHook.php
2. Workflows are set of modules in which business process are combined with tasks( emails , meetings , calls, notes , tasks etc)..
workflows uses hooks to triggers actions after completion of any business stages ( process->process stages-> stage tasks).
that's all
Hope it will help
Almost available at skype or gtalk at ashdwi1.
SugarForge Project:
http://www.sugarforge.org/projects/gmapdirection
Email: ashdwi1@gmail.com
Mob: +919005468298
Hire us at Odesk at
https://www.odesk.com/users/~~b9eff8ff219fd705
Hire Us at Elance at:
http://ashdwi1.elance.com
The two specific examples you mentioned aren't really handled by logic hooks or workflow.
For the most part, Logic Hooks can be though of as code that occurs when a record is saved or loaded.
In order to accomplish what you want to do you'd need to write a PHP file which:
a) Finds the appropriate records to call (doing a sql query).
b) Then performs that action.
You'd then run that php file from the scheduler to run daily or hourly depending on the frequency you choose.
There are probably sugar extensions which perform what you want. Take a look on www.sugarforge.org.
Sugar 6 Pro, On-Site (Apache 2.0, MySQL 5.1, PHP 5.2.6)
My SugarForge Projects:
Email To Sugar - Archive emails in any mail client by adding a BCC line.
Task Dashlets Plus- Adds custom dashlets for: tasks assigned to me by others, delegated tasks, overdue tasks, and open tasks past start date
www.blakerobertson.com
I am trying to do the Using Dependencies in Logic Hooks as the code specified in sugar documentation is:
<?php
require_once("include/Expressions/Dependency.php");
require_once("include/Expressions/Trigger.php");
require_once("include/Expressions/Expression/Parser/Parser.php");
require_once("include/Expressions/Actions/ActionFactory.php");
class Update_Account_Hook {
function updateAccount($bean, $event, $args) {
$formula = translate('RATING_FORMULA', 'Accounts');
$triggerFields = Parser::getFieldsFromExpression($formula);
$dep = new Dependency('updateRating');
$dep->setTrigger(new Trigger('true', $triggerFields));
$dep->addAction(ActionFactory::getNewAction('SetValue ',
array('target' => 'rating', 'value' => $formula)));
$dep->fire($bean);
}
}
?>
but on writing it gives following error:
Fatal error: Cannot redeclare class Update_Account_Hook in /var/www/SugarPro-Full-6.1.0/custom/modules/Accounts/logic_hooks.php on line 8
please help me !
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks