[Vtigercrm-developers] making custom UIType class/template?

Alex Hall ahall at autodist.com
Mon Jun 25 19:18:19 GMT 2018


Hi all,
Thank you for the responses on my question about getting the parent of an
entity. After reading your emails and thinking more about how we want this
to look, my work's IT team is thinking we'll go with a dropdown. I am
trying to start writing the UIType class we'll use, but I'm unsure about a
few things.

First, here's how we envision this type working. When it's in edit view,
it's a dropdown. Its options consist of all the contacts owned by the
organization being edited. The value of each option is that child contact's
ID in Vtiger, and its display text is the contact's normal display as
rendered by its type. In list/detail views, where it isn't being edited,
the display is the selected contact's display text, but made into a link
that shows the contact's detail view when clicked.

My questions:

* in reading through existing UIType classes, I'm seeing a lot of
"get('field')" calls. What exactly does this return?
* What do I need to do on the SQL side to get my new type working? I
imagine I'll have to insert a row somewhere, but into which table(s)?
* Where do you suggest the logic for setting the options goes? I'll need to
get the current organization's list of owned contacts, then make them the
options. I have yet to read through the UIType for any list types, so this
question may well be answered there, but any thoughts would still be
welcome.

Thanks for your help!

-- 
Alex Hall
Automatic Distributors, IT department
ahall at autodist.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20180625/c8b8eb0d/attachment.html>


More information about the vtigercrm-developers mailing list