Hi,
Is there a way to set the default value of a flex relate field, or even better to convert the flex relate field into a relate field, without corrupting existing relationships etc ?
Thanks
Bungle
Hi,
Is there a way to set the default value of a flex relate field, or even better to convert the flex relate field into a relate field, without corrupting existing relationships etc ?
Thanks
Bungle
With some google, I managed to set the default value of the dropdown by setting :
$dictionary[‘Lead’][‘fields’][‘parent_type’][‘default’]=’{myDefaultValue}’; (ie. {myDefaultValue} = Contacts)
in the file :
custom/Extension/modules/Leads/Ext/Vardefs/MyVardefs.php
and was able to limit what was shown in the dropdown by setting
function display()
{ //call parent display method
//parent::display();
//ADDED THE FOLLOWING
$this->ev->process();
unset($this->ev->fieldDefs['parent_name']['options']['Project']); //Remove Project
unset($this->ev->fieldDefs['parent_name']['options']['Meetings']); //Remove Project
echo $this->ev->display($this->showTitle);
}
in /var/www/crm/custom/modules/Leads/views/view.edit.php
Thanks for sharing your solution.