[Vtigercrm-developers] What is the point of vtws_retrieve, retrieve_related?

Alan Lord alanslists at gmail.com
Thu Aug 27 12:37:13 GMT 2020


What is the point of the Server API retrieve type functions when they do 
not convert the raw data from a record(s) into the current_user's 
expected formats?

When I pull data using these methods, dates are provided in ISO 8601 
format, currency fields are just raw floats with no consideration of the 
user's Currency Decimal setting and there are no currency symbols.

Having to use this API for (vtiger Marketplace) modules which display 
data in the vtiger UI seems pointless as the Record Model provides all 
the necessary APIs already... After retrieving the raw data via 
vtws_retrieve/retrieve_related I then have to:

1. Determine the type of the field to see if it needs formatting (not 
obvious as we only have: fieldname => value)
2. Load an entity/Record Model/Field Model to get the appropriately 
formatted data

I do wonder if we could use the DataTransform class for this, but there 
is no documentation and it is hard to work out what is required for this 
work properly.

Al



More information about the vtigercrm-developers mailing list