[Vtigercrm-developers] realated field's content of the Users module changes in a strange way

Szabesz szabeszg at gmail.com
Mon Sep 17 11:51:26 PDT 2012


Hi,

To answer my own question, I've found this post:
https://forums.vtiger.com/viewtopic.php?f=95&t=44429

Is it still the case? Don't we have a proper UI type for users, just this limited UI type 52? Is version 6 going to have a new UI type for users?

thanx
Szabesz

> Hi list,
> 
> I have created a custom entity module and it is working fine except the field that should store a user form the Users module.
> 
> The code that generates the field is this:
> 
> $fieldProjectGroups8 = new Vtiger_Field();
> $fieldProjectGroups8->name = 'linktouser';
> $fieldProjectGroups8->label= 'Professional Assistance';
> $fieldProjectGroups8->column = 'linktouser';
> $fieldProjectGroups8->columntype = 'VARCHAR(100)';
> $fieldProjectGroups8->table = 'vtiger_projectgroups';
> $fieldProjectGroups8->uitype = 10;
> $fieldProjectGroups8->typeofdata = 'V~M';
> $blockProjectGroups1->addField($fieldProjectGroups8);
> $fieldProjectGroups8->setRelatedModules(Array('Users'));
> 
> The field seems to be working fine in the UI, but after saving the record it changes to different entities, such as a Contact or if I choose another user it changes to an Organization. So the user pop-up window lets me choose a user, but saving it sets up a different relationship and I can even click on the related item and it the link works, but of course I need to store a user in this field, not anything else "at random"...
> 
> Can anyone help me to fix it? I really have no clue what I should do to set it up properly.
> 
> thanx in advance
> Szabesz



More information about the vtigercrm-developers mailing list