[Vtigercrm-developers] Custom Module - Multiple Issues

Richard Hills richard at tw.co.nz
Tue Nov 6 13:40:47 PST 2012


The related list now shows values under the label, this was accomplished 
by making the following change:

before:
>         var $list_fields = Array (
>                 '*Mortgage Title*'=> Array('twtmortgage', 'mortgagename'),
>                 'Assigned To' => Array('crmentity','smownerid'),
>         );
>         var $list_fields_name = Array(
>                 '*Mortgage Title*'=> 'mortgagename',
>                 'Assigned To' => 'assigned_user_id',
>         );


after:
>         var $list_fields = Array (
>                 '*Mortgage Title*'=> Array('twtmortgage', 'mortgagename'),
>                 'Assigned To' => Array('crmentity','smownerid'),
>         );
>         var $list_fields_name = Array(
>                 '*Mortgage Name*'=> 'mortgagename',
>                 'Assigned To' => 'assigned_user_id',
>         );


Can someone explain to me the reason why these two labels in different 
arrays need to be named differently? Is this supposed to be fixed up 
later by using language variables to override the label shown anyway?

I am still not seeing the linked values to go to detail view in my list 
views, so any feedback on that would still be greatly appreciated also.

Thanks



On 07/11/12 08:55, Richard Hills wrote:
> I have found the correct function etc for linking.
>
>> if($focus->column_fields['RelatedTo']) {
>>         $delete = $adb->pquery("DELETE FROM vtiger_crmentityrel WHERE 
>> crmid = ?",array($focus->id));
>>
>>         $setype1 = $adb->pquery("select setype from vtiger_crmentity 
>> where crmid=?", array($focus->column_fields['RelatedTo']));
>>         $setype =  $adb->query_result($setype1,0,"setype");
>>         $focus->save_related_module($currentModule, $focus->id, 
>> $setype, $focus->column_fields['RelatedTo']);
>>
>>
>> }
>
> If anyone wants to tell me I'm doing it wrong go ahead. I just added 
> this to the Save.php of my module.
>
> I still have an issue with the relatedlistview, I see the label for 
> the column I want to display, but I dont see any values. The edit, 
> assigned to and delete links work fine, so it does link and is usable, 
> but very ugly.
>
> Thanks
>
> On 06/11/12 19:21, Richard Hills - TechnologyWise wrote:
>> I have since found that the relatedlist view should not display (can 
>> anyone provide a script example to do this? If not I will have a look 
>> in the office tomorrow).
>>
>> source https://wiki.vtiger.com/index.php/CreatingEntityModule
>>> "This is an attempt to achieve generic behavior. You can write 
>>> custom call back functions to handle related list queries that will 
>>> meet your requirements. "
>> My list entries not displaying a link correctly remains an issue, if 
>> anyone can suggest a solution that would be great.
>>
>> Thank you.
>>
>> On 06/11/12 10:32, Richard Hills wrote:
>>> I have been having countless issues and am pulling out hair. If 
>>> anyone could take a look at what I have provided that would be great:
>>>
>>> http://pastebin.com/5peXxJF0
>>>
>>> (this is just the part I believe is relevant from my modules php 
>>> file, if you need more just let me know).
>>>
>>> Issues:
>>>
>>>   * Popup.php items are not clickable
>>>   * List view items are not clickable
>>>   * The related account / contact saves fine when editing a record,
>>>     however is not viewable in the "related list" from contacts /
>>>     accounts.
>>>
>>> Thank you
>>>
>>>
>>>
>>>
>>> On 06/11/12 09:48, Richard Hills wrote:
>>>> Can anyone give me an overview of what the table "vtiger_entityname" is
>>>> used for?
>>>>
>>>> I am having issues with a custom module and I believe that not
>>>> understanding this is the route of the issue.
>>>>
>>>> Thank you.
>>>>
>>>> On 06/11/12 05:17, John Crisp wrote:
>>>>> On 05/11/12 16:50, Adam Heinz wrote:
>>>>>> Anyway, I'm going to look into writing some sort of afterdelete
>>>>>> trigger on Documents to delete the associated attachment (I will check
>>>>>> for other references first).
>>>>>>
>>>>> Nice one - we store loads and it will be great to know that they get
>>>>> tidied up !
>>>>>
>>>>> B. Rgds
>>>>> John
>>>>> _______________________________________________
>>>>> http://www.vtiger.com/
>>>
>>>
>>> -- 
>>> Richard Hills
>>> TechnologyWise Ltd, Tauranga, NZ
>>> richard at tw.co.nz
>>> www.technologywise.co.nz
>>> ph: +64 (0)7 571 1060
>>> fax: +64 (0)7 571 1061
>>>
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
>
> -- 
> Richard Hills
> TechnologyWise Ltd, Tauranga, NZ
> richard at tw.co.nz
> www.technologywise.co.nz
> ph: +64 (0)7 571 1060
> fax: +64 (0)7 571 1061
>
>
> _______________________________________________
> http://www.vtiger.com/


-- 
Richard Hills
TechnologyWise Ltd, Tauranga, NZ
richard at tw.co.nz
www.technologywise.co.nz
ph: +64 (0)7 571 1060
fax: +64 (0)7 571 1061

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20121107/54fbb0a2/attachment.html 


More information about the vtigercrm-developers mailing list