Conditional read only

  • 3
  • Question
  • Updated 3 years ago
  • Answered
Is it possible to change a page to be read only (from edit) based on the value in a field?

In other words, in our opportunities, we have a status field.  We would like to lock down the page once the status hits 'Closed'.  I know we can do this through separate page layouts being driven by workflow rules changing record types, but I was hoping for a solution that would not require us to maintain two versions of the same page.
Photo of Jay Steinberg

Jay Steinberg

  • 408 Points 250 badge 2x thumb

Posted 3 years ago

  • 3
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Jay,

There may be other methods, but you could set a model action to look for changes to your status field, and fire some javascript. Then use something like this: https://community.skuidify.com/skuid/topics/_edit_mode_button
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yup.  What Matt said.. 
Photo of Jay Steinberg

Jay Steinberg

  • 408 Points 250 badge 2x thumb
Awesome...thanks gentlemen.
(Edited)
Photo of Peter Bender

Peter Bender, Champion

  • 6,246 Points 5k badge 2x thumb
There is a TON of code in the issue linked to and dozens of comments - very tough to follow. Isn't there any easier way to conditionally set a table's or field editor's "default mode" property upon page load? My use case is the same as stated above: If he record's status field = "submitted" it should be read-only, and if not it should be editable. This is a very common situation for our clients and it would be really valuable to be able to control this without the complexity of record types, workflow rules, sharing rule switching, etc.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Agreed.

However, I think you can just use the official response from Chris at the top of that thread.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Skuid - make this an idea?