[Vtigercrm-developers] In which file update i would get one more option like "Generate Sales Order"?

kiran kiranraju.jakka at gmail.com
Wed Aug 24 10:28:50 GMT 2016


Hello sir,

Thank you very much for that.

I tried to give an action link by using following code. Before nothing is
there in that file. Now it looks like as follows,
class BOM_DetailView_Model extends Inventory_DetailView_Model {

/**
	 * Function to get the detail view links (links and widgets)
	 * @param <array> $linkParams - parameters which will be used to
calicaulate the params
	 * @return <array> - array of link models in the format as below
	 *                   array('linktype'=>list of link models);
	 */
	public function getDetailViewLinks($linkParams) {
		$currentUserModel =
Users_Privileges_Model::getCurrentUserPrivilegesModel();

		$linkModelList = parent::getDetailViewLinks($linkParams);
		$recordModel = $this->getRecord();

		$imdModuleModel = Vtiger_Module_Model::getInstance('IMD');
		if($currentUserModel->hasModuleActionPermission($imdModuleModel->getId(),
'EditView')) {
			$basicActionLink = array(
				'linktype' => 'DETAILVIEW',
				'linklabel' => vtranslate('LBL_GENERATE').'
'.vtranslate($imdModuleModel->getSingularLabelKey(), 'IMD'),
				'linkurl' => $recordModel->getCreateImdUrl(),
				'linkicon' => ''
			);
			$linkModelList['DETAILVIEW'][] =
Vtiger_Link_Model::getInstanceFromValues($basicActionLink);
		}

		return $linkModelList;
	}
}

When i try to execute this code i'm getting an error not even able to log
the error.

Thanks again,



--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-Developers-In-which-file-update-i-would-get-one-more-option-like-Generate-Sales-Order-tp19735p19739.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list