
Originally Posted by
jojiju hi sidh211,
I found the solution of the problem. according to mine requirements. I built new module called milestone through module builder. I added the custom fields like project name of type relate that will relate to the project module. now I added that project name in all the layouts eg. edit view, search view, listview and search view(basic).
now deploy the module or another option publish the custom module and install through the module loader.
my file in milestone's vardef look like as follows ---project_name is a relate field
step1.
'project_name' =>
array (
'required' => false,
'source' => 'non-db',
'rname'=>'name',
'link'=>'project_milestone',
'table'=>'project',
'name' => 'project_name',
'vname' => 'LBL_PROJECT_NAME',
'type' => 'relate',
'massupdate' => 0,
'comments' => '',
'help' => '',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => 0,
'reportable' => 0,
'len' => '255',
'id_name' => 'project_id',
'ext2' => 'Project',
'module' => 'Project',
'studio' => 'visible',
),
I only added
'rname'=>'name',
'link'=>'project_milestone',
'table'=>'project',
in above relate field.....
step 2.
'project_milestone' =>
array (
'name' => 'project_milestone',
'type' => 'link',
'relationship' => 'project_financial_milestone',
'vname' => 'LBL_PARENT_NAME',
'link_type' => 'one',
'side'=>'right',
'module'=>'Project',
'bean_name'=>'Project',
'source'=>'non-db',
),
this is the link field (project _milestone) in step 1.
n parent module's vardef I added the following
'financial_milestones' =>
array (
'name' => 'financial_milestones',
'type' => 'link',
'relationship' => 'project_financial_milestone',
'side' => 'right',
'source'=>'non-db',
'vname'=>'LBL_NEW_FORM_TITLE',
),
note the relationship ie. project_financial_milestone should be same in step2
now in relationship array of project's vardefs
add the following
'project_financial_milestone' => array(
'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
'rhs_module'=> 'pm_Milestones', 'rhs_table'=> 'pm_milestones', 'rhs_key' => 'project_id',
'relationship_type'=>'one-to-many'),
go to admin->repair n rebuild
now search the milestones by project(relate field) it works
cheers
Bookmarks