[Vtigercrm-developers] VT6 vtlib -> calendar

Alan Lord alanslists at gmail.com
Thu Mar 20 08:31:03 GMT 2014


On 20/03/14 06:45, Uma S wrote:
> Hi Alan,
>
> when you do an ajax request to get Quick-create form, from custom module
> by clicking on add button from summary widget. Please check your ajax
> request is sending parent_id in request.

Hi Uma,

In my custom module I have

models
   ->DetailView.php
   ->Module.php
   ->Record.php
views
   ->Detail.php

In my Record.php I already have:

> class LSEnquiries_Record_Model extends Vtiger_Record_Model {
>
> 	/**
> 	 * Function returns the url for create event
> 	 * @return <String>
> 	 */
> 	function getCreateEventUrl() {
> 		$calendarModuleModel = Vtiger_Module_Model::getInstance('Calendar');
> 		return $calendarModuleModel->getCreateEventRecordUrl().'&parent_id='.$this->getId();
> 	}
>
> 	/**
> 	 * Function returns the url for create todo
> 	 * @return <String>
> 	 */
> 	function getCreateTaskUrl() {
> 		$calendarModuleModel = Vtiger_Module_Model::getInstance('Calendar');
> 		return $calendarModuleModel->getCreateTaskRecordUrl().'&parent_id='.$this->getId();
> 	}
>
> }

But what I can't see is where the parent_id param id added to the 
widget's "Add" button? It's ajax params is currently:

> undefined=4&module=Calendar&view=QuickCreateAjax

I guess here "undefined" should say "parent_id", but I can't find where 
this is actually set.

Any pointers please?

Thanks for your help & patience.

Al





More information about the vtigercrm-developers mailing list