I found that all the workflows are before save, somebody knows how to create workflows after save?
Thanks
DAniel
I found that all the workflows are before save, somebody knows how to create workflows after save?
Thanks
DAniel
Hi Daniel
The Alert work flow are all after_save.
Regards
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.
here is the logic_hooks.php file generated.
As you can see, the hook is registered for the 'before_save' event.
<?php
// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['before_save'] = Array();
$hook_array['before_save'][] = Array(1, 'workflow', 'include/workflow/WorkFlowHandler.php','WorkFlowHandler', 'WorkFlowHandler');
?>
Is there a way to change it via the GUI?
Can sugar run a hook after an entity is saved only for newly created entities?
Yes, now workflow will only run before save, but there is logic hooks for 'after save'.
you can refer to data/sugarbean.php, save method.
there is
$this->call_custom_logic("before_save", $custom_logic_arguments);
and
$this->call_custom_logic('after_save', '');
workflow will be introduce by the first call_custom_logic.
I think you can custom the workflow to make it run after save by yourself.
But I'm wondering why you want to run the workflow after save?
You can set a uid for a record before save method
Then you can use the related module information before save.PHP Code:if(empty($focus->id)) {
$focus->id = create_guid();
$focus->new_with_id = true;
}
But such as case_id cannot be get by this way.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks