[Vtigercrm-developers] UItype 10 field stay blank when use VGS Related Field Generator

Arnaud johnthe5th at gmail.com
Tue Aug 16 08:24:27 GMT 2022


I created the module with the free module builder extension from
technokrafts (
https://www.technokrafts.com/technokrafts-shop/vtiger-crm-addons/vtiger-module-builder/
).
And then import the .zip file into admin part of Vtiger.
How can I fix it now without creation of a new module?

Le mar. 16 août 2022 à 10:04, Martin Allen <martin.allen at exe-squared.co.uk>
a écrit :

> If your creating your module using vtlib then you can set an entityname
> field during the creation using the setEntityIdentifier() function in
> vtlib/Vtiger/Module.php
>
>
>
>     $module = new Vtiger_Module();
>
>     $module->name = $MODULENAME;
>
>     $module->parent= $PARENT;
>
>     $module->save();
>
>
>
>     $module->initTables();
>
>
>
>     $block = new Vtiger_Block();
>
>     $block->label = 'LBL_MessageBoard_Information';
>
>     $module->addBlock($block);
>
>
>
>     $field1  = new Vtiger_Field();
>
>     $field1->name = $ENTITYNAME;
>
>     $field1->label= $ENTITYLABEL;
>
>     $field1->uitype= 2;
>
>     $field1->column = $field1->name;
>
>     $field1->columntype = 'VARCHAR(255)';
>
>     $field1->typeofdata = 'V~M';
>
>     $block->addField($field1);
>
>
>
>     $module->setEntityIdentifier($field1);
>
>
>
> *From:* Arnaud <johnthe5th at gmail.com>
> *Sent:* 16 August 2022 08:55
> *To:* Martin Allen <martin.allen at exe-squared.co.uk>;
> vtigercrm-developers at lists.vtigercrm.com
> *Subject:* Re: [Vtigercrm-developers] UItype 10 field stay blank when use
> VGS Related Field Generator
>
>
>
> Martin,
>
>
>
> Ok understood, I think you're right. Passing to SQL debug to see the
> query, I saw "*SELECT fieldname, tablename, enityfield FROM
> vtiger_entityname WHERE tabid = '63'"*. From scratch there is no entry.
>
> That means for me, my custom module is not correctly registered into
> vtiger_entityname. So I tried to insert it by myself manually  :
>
> tabid = 63
> modulename = Numerosda
> tablename = vtiger_numerosda
> fieldname = numerosdano (also tried to put numerosdaid)
> entityidfield = numerosdaid
> entityidcolumn = numerosdaid
>
>
>
> But It doesn't work. Is there a clever / better way to insert into this
> table ?
>
> What can I check now ?
>
>
>
> Many thanks.
>
>
>
>
>
>
>
>
>
> Le ven. 12 août 2022 à 11:58, Martin Allen <martin.allen at exe-squared.co.uk>
> a écrit :
>
> The fact that your field still shows ‘tapez pour rechercher’ would
> indicate that it hasn’t picked up the relationship at all – if it were
> showing a blank value, you wouldn’t see this text (we’ve had that issue
> before). And also your not getting the ‘x’ button to remove the
> relationship, which only shows if the relationship has been set – this
> leads me to believe the relationship is NOT being set at all.
>
>
>
>
>
>
>
> *From:* Arnaud <johnthe5th at gmail.com>
> *Sent:* 12 August 2022 10:10
> *To:* Martin Allen <martin.allen at exe-squared.co.uk>;
> vtigercrm-developers at lists.vtigercrm.com
> *Subject:* Re: [Vtigercrm-developers] UItype 10 field stay blank when use
> VGS Related Field Generator
>
>
>
> Martin, I tried adding the entry but that didn't help me.
>
> Are you sure my problem can come from this table?
>
> Maybe I misspoke to explain the problem, it looks like more a javascript
> problem.
>
> I made a screenshot for better understanding :
> https://i.ibb.co/7bR96sQ/vtiger-problem.png
>
>
>
> The problem occurs before clicking on save and therefore before any
> addition to the database. There is no javascript error in the console.
>
>
>
> Le ven. 12 août 2022 à 09:32, Martin Allen <martin.allen at exe-squared.co.uk>
> a écrit :
>
> Also check the value for the record in vtiger_crmentity in the label
> column – if I remember correctly it will use the details from
> vtiger_entityname to populate the correct value in vtiger_crmentity.label.
> So if you had no entry in vtiger_entityname for your module when the record
> was created, then it won’t have a value in this column. Any new record
> should be populated with a value since you put the entry into
> vtiger_entityname.
>
>
>
> *From:* vtigercrm-developers-bounces at lists.vtigercrm.com <
> vtigercrm-developers-bounces at lists.vtigercrm.com> *On Behalf Of *Martin
> Allen
> *Sent:* 11 August 2022 16:23
> *To:* Arnaud <johnthe5th at gmail.com>;
> vtigercrm-developers at lists.vtigercrm.com
> *Subject:* Re: [Vtigercrm-developers] UItype 10 field stay blank when use
> VGS Related Field Generator
>
>
>
> It will be in vtiger_entityname database table.
>
>
>
> It records the module (by tabid and module name), the db table (tablename)
>  and id field name and column (so it know how to look up the correct record
> in the table), and then fieldname, which is the actual entity name field.
> It’s the value of this field that would be shown in a related field to that
> particular record.
>
>
>
> *From:* Arnaud <johnthe5th at gmail.com>
> *Sent:* 11 August 2022 15:54
> *To:* vtigercrm-developers at lists.vtigercrm.com; Martin Allen <
> martin.allen at exe-squared.co.uk>
> *Subject:* Re: [Vtigercrm-developers] UItype 10 field stay blank when use
> VGS Related Field Generator
>
>
>
> Hi Martin,
>
>
>
> You mean in Vtiger_fields table ?
>
>
>
> Regards,
>
>
>
> Le jeu. 11 août 2022 à 15:20, Martin Allen <martin.allen at exe-squared.co.uk>
> a écrit :
>
> What is the entityname field for the module its relating to? If that value
> is blank for the related record then it will show as blank.
>
>
>
> *From:* vtigercrm-developers-bounces at lists.vtigercrm.com <
> vtigercrm-developers-bounces at lists.vtigercrm.com> *On Behalf Of *Arnaud
> *Sent:* 08 August 2022 10:49
> *To:* vtigercrm-developers at lists.vtigercrm.com
> *Subject:* [Vtigercrm-developers] UItype 10 field stay blank when use VGS
> Related Field Generator
>
>
>
> Hello,
>
> UItype 10 field stay blank when use VGS Related Field Generator only on
> custom module, (with original there is no problem).
> I can select entry in the POP when I click on magnifying glass, but once
> POP UP close, the field stay totally empty.
>
> Even if I create manually the field manualy into database instead of using
> VGS Related Field Generator I have the same problem. This issue is not VGS
> Related Field Generator relative.
>
> Many thanks for your ideas.
>
> Regards,
>
> Arnaud.
>
> _______________________________________________
> http://www.vtiger.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220816/c58d8d01/attachment.html>


More information about the vtigercrm-developers mailing list