Ach nie zauważyłem. Dla zadań powinno działać, bo tam używane jest $values. Natomiast poniżej widzę, że jest ustawione osobno priority.
Całość poprawiona
$x = ModuleManager::get_instance('/Base_Box|0');
$values['permission'] = 0;
$values['priority'] = CRM_CommonCommon::get_default_priority();
$values['opportunity'] = $record['id'];
if ($action == 'new_task') $x->push_main('Utils/RecordBrowser','view_entry',array('add', null, $values), array('task'));
if ($action == 'new_meeting') $x->push_main('Utils/RecordBrowser','view_entry',array('add', null, array('opportunity'=>$record['id'],'title'=>$values['title'],'permission'=>0,'priority'=>CRM_CommonCommon::get_default_priority(),'description'=>$values['description'],'date'=>date('Y-m-d'),'time'=>date('H:i:s'),'duration'=>3600,'status'=>0,'employees'=>$values['employees'], 'customers'=>$values['customers'])), array('crm_meeting'));
if ($action == 'new_phonecall') $x->push_main('Utils/RecordBrowser','view_entry',array('add', null, array('opportunity'=>$record['id'],'subject'=>$values['title'],'permission'=>0,'priority'=>CRM_CommonCommon::get_default_priority(),'description'=>$values['description'],'date_and_time'=>date('Y-m-d H:i:s'),'employees'=>$values['employees'],'status'=>0, 'customer'=>!empty($values['customers'])?reset($values['customers']):'')), array('phonecall'));
return false;
Pozdrawiam,
Adam