Custom Action

I read a blog on salesagility about adding a custom script to AOW but I’m still kind of lost. Basically I would like to trigger a custom php script on a new record save. Or maybe even a trigger to go to visit a url link.

Navigate to the Custom Folder of the Module you wish to create a logic hook for. e.g: custom/modules/AOW_Actions/
If the Folder does not exist in custom/modules/ then you can create it. In this folder, create a file called logic_hooks.php with the following code:

$hook_version = 1;
$hook_array = Array(); 


Beneath the "$hook_array = Array(); " line you can enter the details of the logic hook in the format:

$hook_array[ '<event_name>' ][] = array(    <process_index>,   '<description>',     '<file_path>',    '<class_name>',     '<method_name>', );

An example of this:

$hook_array[ 'before_save' ][] = Array(1, 'assignUser', 'custom/modules/AOW_Action/autoAssignUser.php', 'UserAssignment', 'updateAction');

Whatever you name your <file_path>, you then must create that as a PHP file. In this example it would be: /custom/modules/AOW_Actions/autoAssignUser.php

Using this example, In this new file, you would have to create a class called UserAssignment and inside that class:

function updateAction(&$bean, $event, $arguments){

Inside those brackets is where you would enter your logic hook’s code.
More information can be found: