[Vtigercrm-developers] Workflows do not get triggered when creating Sales Order from Webservices
Rubén A. Estrada Orozco
rulotec1 at gmail.com
Mon Aug 9 01:25:41 GMT 2021
In the case of vtws_update, the workflows do get triggered. It's kind of
awkward that they don't when its a vtws_create
Saludos
Rubén
On Sat, Aug 7, 2021 at 2:22 AM nilay khatri <nilay.spartan at gmail.com> wrote:
> We are creating Sales Orders via vtws_create function and none of the
> workflows would trigger!
>
> However it does work if we create from UI or use record models.
>
> Did some digging and found out, this is due to Bulk save mode being set
> explicitly..
>
> WHY?
>
>
> https://code.vtiger.com/vtiger/vtigercrm/blob/master/include/Webservices/LineItem/VtigerInventoryOperation.php#L34
>
> $currentBulkSaveMode = vglobal('VTIGER_BULK_SAVE_MODE'); if ($currentBulkSaveMode === NULL) { $currentBulkSaveMode = false; } vglobal('VTIGER_BULK_SAVE_MODE', true); global $currentModule; $currentModule = $elementType; $element = parent::create($elementType, $element); $focus = CRMEntity::getInstance($elementType); $focus->updateMissingSeqNumber($elementType); vglobal('VTIGER_BULK_SAVE_MODE', $currentBulkSaveMode);
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210808/54c1a4d7/attachment.html>
More information about the vtigercrm-developers
mailing list