Hi,
I’ve a custom field in my Account named as f_c. Now what I want to achieve is to have this field populated with some information fetched from current user during the creation of a new account. What is the best way to do this?
Regards,
Mario
Hi,
I’ve a custom field in my Account named as f_c. Now what I want to achieve is to have this field populated with some information fetched from current user during the creation of a new account. What is the best way to do this?
Regards,
Mario
Simple custom view works for me: ( exists a better way? )
inserted the following code in ./custom/modules/Accounts/views/view.edit.php
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.edit.php');
class CustomViewEdit extends ViewEdit{
function preDisplay(){
global $current_user;
$this->bean->f_c = isset($this->bean->id) ? $this->bean->f_c : $current_user->f_c;
parent::preDisplay();
}
}
?>