Hello,
I am creating a new module with very few basic fields as below...
[quote:10kv9qq7]array('name'=>'Subject', 'type'=>'text', 'required'=>true, 'param'=>'64', 'extra'=>false, 'visible'=>true),
array('name'=>'Products', 'type'=>'multiselect', 'required'=>true, 'param'=>Utils_RecordBrowserCommon::multiselect_from_common('MyCRM/Products'), 'extra'=>false, 'filter'=>true, 'visible'=>true),
array('name'=>'Quantity', 'type'=>'integer', 'required'=>false, 'visible'=>true, 'extra'=>false),
array('name'=>'Unit Price', 'type'=>'currency', 'required'=>false, 'extra'=>false, 'visible'=>true),
array('name'=>'Order No', 'type'=>'text', 'required'=>false, 'param'=>'64', 'extra'=>false, 'visible'=>true),
array('name'=>'Start Date', 'type'=>'date', 'required'=>true, 'param'=>64, 'extra'=>false, 'filter'=>true),
array('name'=>'End Date', 'type'=>'date', 'required'=>true, 'param'=>64, 'extra'=>false, 'filter'=>true),
array('name'=>'Status', 'type'=>'commondata', 'required'=>true, 'filter'=>true, 'param'=>array('order_by_key'=>true,'CRM/Status'), 'extra'=>false, 'visible'=>true),
array('name'=>'Permission', 'type'=>'commondata', 'required'=>true, 'param'=>array('order_by_key'=>true,'CRM/Access'), 'extra'=>false)[/quote:10kv9qq7]
I am trying to code it to dispay Record Browser View using existing Contact and PhoneCall codes as a guide. My body() looks like...
public function body(){
$this->rb = $this->init_module('Utils/RecordBrowser','vfcampaign','vfcampaign');
$me = CRM_ContactsCommon::get_my_record();
$this->display_module($this->rb);
}
I have actually commented out many parts of my code to what I feel is the bare minimum, yet I am having trouble resolving the below error. Can someone please help me.
[quote:10kv9qq7]
Type: 8
Message: Undefined index: login
File: D:\Development\PHPDEV\crm\modules\Utils\RecordBrowser\RecordBrowserCommon_0.php
Line=1083
error backtrace:
File: D:\Development\PHPDEV\crm\modules\Utils\RecordBrowser\RecordBrowserCommon_0.php
line 1083
function called: handle_epesi_error(8, "Undefined index: login", "D:\Development\PHPDEV\crm\modules\Utils\RecordBrowser\RecordBrowserCommon_0.php", 1083, Array (#28))
File: D:\Development\PHPDEV\crm\modules\Utils\RecordBrowser\RecordBrowserCommon_0.php
line 1231
function called: build_query("mymodule", Array (), false, Array ())
File: D:\Development\PHPDEV\crm\modules\Utils\RecordBrowser\RecordBrowser_0.php
line 759
function called: get_records_count("mymodule", Array (), false, Array ())
File: D:\Development\PHPDEV\crm\modules\Utils\RecordBrowser\RecordBrowser_0.php
line 274
function called: show_data(Array (), Array (), Array ())
[PHP core called function]
function called: body()
File: D:\Development\PHPDEV\crm\include\module.php
line 793
function called: call_user_func_array(Array (Object (Utils_RecordBrowser), "body"), Array ())
File: D:\Development\PHPDEV\crm\include\module.php
line 713
function called: get_html_of_module(Object (Utils_RecordBrowser), null, null)
File: D:\Development\PHPDEV\crm\modules\CRM\MyModule\MyModule_0.php
line 33
function called: display_module("Object (Utils_RecordBrowser)")
[PHP core called function]
function called: body()
File: D:\Development\PHPDEV\crm\include\module.php
line 793
function called: call_user_func_array(Array (Object (CRM_MyModule), "body"), Array ())
File: D:\Development\PHPDEV\crm\include\module.php
line 713
function called: get_html_of_module(Object (CRM_MyModule), null, null)
File: D:\Development\PHPDEV\crm\modules\Base\Box\Box_0.php
line 145
function called: display_module("Object (CRM_MyModule)")
File: D:\Development\PHPDEV\crm\include\epesi.php
line 209
function called: body()
File: D:\Development\PHPDEV\crm\include\epesi.php
line 265
function called: go(Object (Base_Box))
File: D:\Development\PHPDEV\crm\process.php
line 32
function called: process("box_main_href=213f236cf45502907c1341f8fbe71c16", false)
[/quote:10kv9qq7]