Is there any place where the datatype values are stored? I need to know what kind of data they are in order to display them.For example if the status field is a dropdown I will put a dropdown, if it is a text area I will put a text area etc.
The information is stored in the Vardefs
and can be accessed via the Metadata API
3 Tips for using the Sugar Metadata API
Im working with 6.5.22 this works for me?
No, the API is for v7.x and higher so it will not work in 6.5
But 6.5.x still has metadata for each of the modules, and that metadata describes your fields, including "name" and "type".
It's been a while since I worked in 6.x but each module should have vardefs in its directory:
and custom fields will be in:
To get a list of fields for a given module programmatically, this should work in 6.x
$bean = BeanFactory::getBean($module_name); $field_defs[$module_name] = $bean->getFieldDefinitions();
Each of those definitions should include the field "name" and "type".
Let me know if this helps.
Yeah now i got the datatypes that i need, thank you a lot.
Retrieving data ...