[Vtigercrm-developers] Lazy question on webservices.

Joe Bordes joe at tsolucio.com
Mon Sep 24 00:28:20 PDT 2012


Hi,

Ok, I finally read the conversation thoroughly, which I should have done 
the first time before jumping to conclusions and answering incorrectly. 
I apologize for that.


If I understand correctly the whole problem stems from the fact that you 
are playing with the readonly field in vtiger_field. This field is 
obsolete and has nothing to do with it anymore.

In 5.3, readonly permissions were introduced and work, but at the 
profile level. So each field gets its readonly status based on the users 
profile.
If you go into settings > profiles and mark a field as readonly there, 
you will see that it acts as a displaytype=2 for the users in that profile.

I have never tried accessing or manipulating a field configured like 
this from REST and different users with different profiles, but I'd say 
it should work correctly. Please give it a try and let us know if that 
works, and also, if I am a little bit more "in line" this time :-)


Joe
TSolucio



On 22/09/12 15:53, Alan Lord (News) wrote:
>
> 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
>
>


-- 
Un saludo
Joe
TSolucio



More information about the vtigercrm-developers mailing list