[Vtigercrm-developers] releted list in same module
Manu urs
manu.k at vtiger.com
Fri Jun 12 07:09:01 GMT 2015
Hi
You can able to create a UI type 10 field ,which relate to the same
module .The below code will create a UI type 10 field for contact which
relate to contact module itself.
<?php
> require_once 'includes/Loader.php';
> ini_set("error_reporting", 6135);
> include_once 'include/utils/utils.php';
>
> $proInstance = Vtiger_Module_Model::getInstance('Contacts');
> if($proInstance){
> $fieldInstance = Vtiger_Field_Model::getInstance('contact', $proInstance);
> if ($proInstance !== false && !$fieldInstance) {
> $blockInstance =
> Vtiger_Block_Model::getInstance('LBL_CONTACT_INFORMATION', $proInstance);
> $field = new Vtiger_Field();
> $field->name = 'contact';
> $field->label = 'Contact Name';
> $field->uitype = 10;
> $field->typeofdata = 'I~O';
> $blockInstance->addField($field);
> $field->setRelatedModules(Array('Contacts'));
> echo "<br> Contact- Contact relation ship added";
> }
> }
> ?>
>
Regards,
Manu Urs
On Fri, Jun 12, 2015 at 12:46 AM, Conrado Maggi <comaggi at gmail.com> wrote:
> Hi,
>
> Vtiger expect to found 1 related field between two modules, that's why
> your related list does not work.
>
> The solution is to create a custom function to retrieve the related
> records
>
> Regards
> Conrado
>
>
> El jueves, 11 de junio de 2015, marlos22 <marlos22 at hotmail.it> escribió:
>
>> hi
>>
>> it's possibile create a releted list with Utype 10 field in the same
>> module
>> (custom module)
>>
>> i create this whit a vtiger field generator but in releted list don't see
>> the releted records
>>
>> <http://vtiger-crm.2324883.n4.nabble.com/file/n16537/filed_utype10.gif>
>>
>> <http://vtiger-crm.2324883.n4.nabble.com/file/n16537/relation.gif>
>>
>>
>>
>> --
>> View this message in context:
>> http://vtiger-crm.2324883.n4.nabble.com/releted-list-in-same-module-tp16537.html
>> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
> _______________________________________________
> http://www.vtiger.com/
>
--
Regards,
Manu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150612/11bc77df/attachment.html>
More information about the vtigercrm-developers
mailing list