Skip to content

Instantly share code, notes, and snippets.

@VSeryoga
Last active March 21, 2021 21:08
Show Gist options
  • Save VSeryoga/9d920421dca6652ddb7fab8140d55c6f to your computer and use it in GitHub Desktop.
Save VSeryoga/9d920421dca6652ddb7fab8140d55c6f to your computer and use it in GitHub Desktop.
Запуск бизнес-процесса Битрикс24
<?
CModule::IncludeModule('bizproc');
CBPDocument::StartWorkflow(
99,
array("crm","CCrmDocumentDeal", 'DEAL_'.$deal),
array(),
$arErrorsTmp
);
CBPDocument::AutoStartWorkflows(
array("crm","CCrmDocumentDeal", 'DEAL'),
1,
array("crm","CCrmDocumentDeal", 'DEAL_'.$deal),
array(),
$arErrorsTmp
);
foreach ($_REQUEST['ids'] as $key => $value) {
$r = CBPDocument::StartWorkflow(
71,
['lists', 'BizprocDocument', $key],
[],
$arErrorsTmp
);
}
//for lists
CBPDocument::AutoStartWorkflows(
array("lists","Bitrix\Lists\BizprocDocumentLists", "iblock_29"),
1,
array("lists","Bitrix\Lists\BizprocDocumentLists", $idTransaction),
array(),
$arErrorsTmp
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment