[Vtigercrm-developers] Lazy question on webservices.

Alan Lord (News) alanslists at gmail.com
Sat Sep 22 06:53:16 PDT 2012



On 21/09/12 17:14, Joe Bordes wrote:
>
> I may be a little off-topic here but when you set a field as read-only
> it is because that is what you want vtiger CRM to guarantee, you don't
> want that field being updated through REST, workflow update or anywhere
> else, so that is what vtiger CRM does.

Hey Joe,

your point is valid but...

The way I see it is that displaytype = 2 doesn't actually make the field 
readonly as such. It makes it *invisible* in places in the *UI* where it 
could be changed, i.e. EditView. This functionality is my desired result.

There is another column value in vtiger_field; "readonly" which I would 
hope would do what it says and be the value to validate your comment 
above, but sadly seems not to do much at all right now.

> So, how do you fill it in with a value? with direct database access (=
> SQL update).
> Where do you execute this direct database calculation and update? in
> save_module() or an event handler, so it gets executed on all the save
> events and you are not modifying base vtiger CRM code

That is OK, but it means replicating all the code to create the matching 
crmentity records and such like.

> If you want to update a field via REST, it has to be writable.
>
> At least that is how I see it.

I agree if I was setting a field to be readonly. But to me displaytype 
is only (or should be) a *UI* setting, not a "disable writing" setting.

> Have a nice weekend

Thanks, I am so far. (Have just installed some new custom modules on a 
customer's system to support a Job recruitment process).

Al


-- 
Libertus Solutions
http://www.libertus.co.uk



More information about the vtigercrm-developers mailing list