[quote="ajb":46f3ierb]Exactly as I told you. Use setDefaults. Check out other addons implementation - e.g. in Tasks.
Also I've removed one of your topic, because it's duplicate.
Regards,
Adam[/quote:46f3ierb]
Thanks for your help, I have solved the problem. Now i success create the product module, Then i have create a new module name service module, how to add the service module to the product addon? It is different with product module add to the contact addon,
Utils_RecordBrowserCommon::new_addon('Custom_Product', 'custom/Service', 'product_addon', _M('Service'));
public function product_addon($arg) {
$rb = $this->init_module('Utils/RecordBrowser','Custom_Service','Custom_Service');
$params = array(array('Services'=>'P:'.$arg['id']), array('Services'=>false), array('id'=>'DESC'));
$me = CRM_ContactsCommon::get_my_record();
$rb->set_defaults(array('Services'=>'P:'.$arg['id'], 'Service_manager'=>$me['id'], 'employees'=>$me['id']));
$this->display_module($rb,$params,'show_data');
}
My code has problem Or I missing somethings?
Please help me. Thanks