Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Tuned Listener
Kayono
Posts: 29
Registered: 04-15-2009

ReadOnly field in edit view

[ Edited ]

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

Please use plain text.
Bronze Super Contributor
MikeSpragg
Posts: 317
Registered: 03-24-2009

Re: ReadOnly field in edit view

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.

Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: ReadOnly field in edit view

You might want to take a look at the postings on teh partner side of the community under mobile.

--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
Tuned Listener
Kayono
Posts: 29
Registered: 04-15-2009

Re: ReadOnly field in edit view

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

Please use plain text.
Employee
tskidmore
Posts: 80
Registered: 07-11-2011

Re: ReadOnly field in edit view

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/blob/master/src/Views/OpportunityContact/Edit.js#...

 

That link is dojo based, but the layout/fields are the same.

Please use plain text.
Tuned Listener
Kayono
Posts: 29
Registered: 04-15-2009

Re: ReadOnly field in edit view

Thank you for the example.

Do you know where I can find example to disable a picklist or lookup?

 

Thanks,

~Kayono

Please use plain text.