I created three phone number fields for Calls and I now want to inherite the numbers inthe parent record Account or Contact.
I have the following code to detect if the parent is an Account or Contact
PHP Code:
if (empty($this->ev->focus->id))
if (!empty($this->ev->fieldDefs['contact_id'}{'value']))
{
echo "Parent Contact";
##code here to select phone numbers from contact
}
if (!empty($this->ev->fieldDefs['account_id'}{'value']))
{
echo "Parent Account";
##code here to select phone numbers from account
}
This is code that is already in the view.edit.php file from Sugar.
I've used this in another custom module to pull in info depending on whether the parent is an Account or Contact and it works, but when creating a call under and Account or Contact it doesn't seem to detect what the parent is.
Rgds
Chris
Bookmarks