
02-07-2012 08:39 AM - last edited on 02-07-2012 08:40 AM
Hi,
This is for SLX Mobile v.1.2.
Can somebody share with me what is the best way to make some fields of the edit view to be read only?
For example in Account Edit screen if we want to make the Status to be a read only field.
Thank you,
~Kayono
02-07-2012 09:52 AM
You can set the ReadOnly property (and readonlyeditor) to true. Or, if you want to do this by profile then you might want to put people into profiles and the profile will be applied per user (such that it may be enabled for certain users and read-only for others). Look in the Admin help for Field Level Security.
02-07-2012 01:29 PM
02-08-2012 08:21 AM
Thank you Mike and RJ for the responses.
The client wants to make it readOnly for the Mobile only. So I don't think I can use the profile.
RJ, I did search in the partner area and could not find any sample of making a field "ReadOnly" for the SlxMobile.
I saw something similar (for multiple pick list) but not sure if that would apply in my situation.
Thanks,
~Kayono
02-08-2012 09:26 AM
Edit View controls are handled by the Field "classes" (argos-sdk/src/Controls) and only several fields support `readonly: true` (lowercase), namely TextField and its deritatives. However, all fields do have a `.disable()` function.
Disabling (or setting readonly) for a field does not guarantee that the user cannot change it, so if it is critical they don't I'd suggest re-enforcing any mobile client side rules on the backend.
Another thing to consider is that when Save is pressed it will gather all values - except for HiddenFields and fields where `exclude: true` or `include: false` are set.
You can see an example of readonly/exclude at the latest development on github: https://github.com/SageSalesLogix/argos-saleslogix
That link is dojo based, but the layout/fields are the same.
02-09-2012 09:53 AM
Thank you for the example.
Do you know where I can find example to disable a picklist or lookup?
Thanks,
~Kayono