/** * get the location for the record based on the module type * @param type $request * @return type */ static function getLocation($request) { $recordId = $request->get('recordid'); $module = $request->get('source_module'); $locationFields = self::getLocationFields($module); $address = array(); if (!empty($locationFields)) { $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $module); foreach ($locationFields as $key => $value) { $address[$key] = Vtiger_Util_Helper::getDecodedValue($recordModel->get($value)); } } return $address; }