<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
Dear vtiger Team,<br>
<br>
As per Rishab's suggestion of 07/22 I have created a custom UIType
(special multiselect picklist) for my custom module.<br>
<br>
I have created:<br>
<b>.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl</b>
and<br>
<b>.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiPicklist.tpl</b>
and did the necessary modification for my purposes.<br>
<br>
I have also created the necessary service files:<br>
<b>.../modules/</b><b><b>CustomModule</b>/uitypes/MyMultipicklist.php</b>
and<br>
<b>.../modules/</b><b><b><b>CustomModule</b></b>/models/Field.php</b>
to serve the template with data.<br>
<br>
The class <b>CustomModule</b><b>_Field_Model</b> extends <b>Vtiger_Field_Model</b>
and class <b>CustomModule</b><b>_MyMultipicklist_UIType</b> extends
<b>Vtiger_Base_UIType</b> .<br>
<br>
With rewriting the display related methods in the above mentioned 2
classes the custom UIType field started work in my custom module.<br>
The listview, the detailvew and the editview also showed the
necessary field data in the necessary display format.<br>
<br>
The listview loaded the template from the file
".../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl"
and the detailview and editview loaded the template from the<br>
".../layouts/vlayout/modules/CustomModule/uitypes/MyMultiPicklist.tpl".<br>
<br>
<big><big><b>But clicking</b></big></big> to the header of the
listview to get sort by some field or search by some field (does not
matter what was the search field) I have received a template error:<br>
<font color="#cc0000"><br>
<big>Unable to load template file '<b>modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl</b>'
in '<b>modules/</b><b><b><b>CustomModule</b></b>/ListViewContents.tpl</b>'</big></font><br>
<br>
Copying file
'.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl'
to the directory
'.../modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl' the
template error resolved.<br>
<br>
It indicates the sort_by and search javascript functions on the
listview screen use a hardcoded path to the templates and did not
use the callback to the CustomModule directory.<br>
<br>
<br>
<div class="moz-signature">-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a class="moz-txt-link-abbreviated" href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</body>
</html>