12-30-2015, 11:58 AM
Okay, now that I've got my module to save records from within the application, I know I should be able to create records from a workflow. So, here's what I think I should do:
Within my workflow functions, I include the file 'include/Webservices/Create.php'. Then I execute the following:
Now for some questions. For the module name, I assume I should use the name from the 'vtiger_tabs' table. The array should be 'columnname in exactonline table' => 'value to save', excluding the record no, since that is a ui type 4 and should auto gen. the current user, will that be available, or should I first bring it in from the global scope? Or even do it like this:
Like in this example?
Within my workflow functions, I include the file 'include/Webservices/Create.php'. Then I execute the following:
PHP Code:
vtws_create('ExactOnline', $array_of_data_to_save, $current_user);
Now for some questions. For the module name, I assume I should use the name from the 'vtiger_tabs' table. The array should be 'columnname in exactonline table' => 'value to save', excluding the record no, since that is a ui type 4 and should auto gen. the current user, will that be available, or should I first bring it in from the global scope? Or even do it like this:
PHP Code:
$current_user = Users::getActiveAdminUser();
Like in this example?