[Vtigercrm-developers] Invoke Custom Function in Workflow Task

Jeff Sherk Forerunner Ministries jeff at ForerunnerTV.com
Tue Apr 13 22:06:05 PDT 2010


On 4/13/2010 6:32 PM, Jeff Sherk Forerunner Ministries wrote:
> 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
> _______________________________________________
>
>    

Ok, with much trial and error I think I figured it out. See here:
http://forums.vtiger.com/viewtopic.php?p=104978

Thanks



More information about the vtigercrm-developers mailing list