[Vtigercrm-developers] Invoke Custom Function in Workflow Task
Jeff Sherk Forerunner Ministries
jeff at ForerunnerTV.com
Tue Apr 13 16:32:12 PDT 2010
The documentation on Workflows has some problems:
http://wiki.vtiger.com/index.php/vtiger510:Module_Workflow
Under Invoke Custom Function:
(1) The demo function contains the $entity in it ... is this a global
variable that is passed into the function or does it need to be defined
somewhere else first?
(2) The doc says to put your file in module/Workflow/Demo.inc but there
is no Workflow folder. Does this folder need to be created, or can it go
in any folder as long as we give the correct path?
(3) The line in that reads "The method then needs to be registered, for
example if the method was defined in the file modules/demo/Demo.inc for ..."
This is a different folder (module/demo/Demo.inc) than what is specified
in the code above and the code below... I am assuming that this is a Typo.
(4) In this line:
$emm = new VTEntityMethodManager($adb);
Is $adb a global variable or does it need to be defined somewhere else
first??
(5) In this line:
$emm->addEntityMethod("PurchaseOrder", "method",
"modules/Workflow/Demo.inc", "demo");
What does "PurchaseOrder" get replaced with? Is the module name? Would
it be Contact or Contacts? What are all the possible module names that
can be used?
Also, what does "method" get changed to? Is it always 'method', or is
this the name that will appear in the list on the Task page?
(6) And most importantly, where and how do you actually register the
method! It gives no indication of what file to put the code in or how to
register the method!
I will gladly create a better working example for docs and forum, but I
need answers to the above questions.
Thanks
More information about the vtigercrm-developers
mailing list