$order = $event->getParameter("ENTITY");
$order->setField("STATUS_ID", "T");
$order->save();
public function changeStatusOnOrderCreate(\Bitrix\Main\Event $event)
{
/** @var \Bitrix\Sale\Order $order */
$order = $event->getParameter("ENTITY");
$order->setField("STATUS_ID", "T");
$event->addResult(
new Main\EventResult(
Main\EventResult::SUCCESS, $order
)
);
}