Display a Lock Icon on field editor ReadOnly fields

  • 2
  • Question
  • Updated 1 year ago
  • In Progress
Standard salesforce detail pages display a lock for non-editable fields and a pencil for edittable fields. Skuid only displays the pencil icon for edittable fields.

 How can I replicate standard SFDC functionality and get a lock on my readonly fields? 




Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb

Posted 1 year ago

  • 2
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Great question.

This will require custom javascript. I don't know of a declarative method to do this.
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Do you have a particular use case here? Typically we advise people to either not show the field entirely or make it to where it can't be edited on the page. 
Photo of Josef Lagorio

Josef Lagorio

  • 2,874 Points 2k badge 2x thumb
Our use case is to replicate the behavior of standard SFDC. If a user is accustom to seeing a lock or pencil on a detail page while trying to in-line edit then they would expect to see the same on a skuid detail page. 

If we have hundreds or even thousands of users looking at a new skuid record detail, a small change like this can sound some pretty major alarms. I personally notice it every time I preview a page and I am the person building said page. 

Taking away the ability to inline edit takes away a tremendous amount of value so if someone has an example of this that would be great. If not, I will carry along :)
(Edited)
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
I see.

The good news is that we do have the action icon ui-silk-lock available within this theme. That will likely be needed to achieve this with custom javascript.