How to apply the Sharing setting for SKUID pages?

  • 1
  • Question
  • Updated 4 years ago
  • Answered
How to apply the Sharing setting for SKUID pages?
I have a object called "Project". I have set the OWD as "Public Read only" for this object. So I can view all the users record. When I edit the other users record from list view it opens
the SKUID edit page, here I want to show the "Insufficient privilege" error message instead of showing the edit page (like standard Salesforce behavior).
Now, When I save the edited record it shows the error.

Thanks in advance.
Photo of rajadurai k

rajadurai k

  • 360 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I don't think we are going to have a good answer for you.  Salesforce will not let us query the record level sharing settings table.  We are only provided information about he sharing when we try to save back to the database.  We cannot proactively prevent users from taking action on a page. 

One reason salesforce can give an insufficient privildeges message on edit is because they are showing two very different pages for View and Edit.  Generally in Skuid we show one page that is used for both purposes. 

If you didn't mind creating a second page you could set up an "Edit button"  that ran a sequence of actions.  It would first save the record model, which would fail if the user didn't have Write sharing rights.  You can define a failure branch on the save action - presenting a message saying "Insufficient rights"    

Similarly,  you could build the basic page components in read only mode and then have a button that ran a few actions.  The first would save the model (as above) adn presented the failure message..  Then a second action would run a snippet that took components into edit mode.  Here is a post about doing that. 

Hopefully these ideas will give you a place to start.