mandatory fields on the layout..?

  • 1
  • Question
  • Updated 4 years ago
I have a detailed layout page. Now i want the user can't remove couple of fields from the layout i.e. they are mandatory on the page. How can I achieve that ...???
This functionality is very important  for me .
Thanks 
Rizvan
Photo of Rizvan Ansari

Rizvan Ansari

  • 382 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
Do you want your users to be forced to enter data in these fields?   (Look for the "required flag" in the field properties to force this)  Or do you want users that have page builder permissions from being able to remove the fields from layouts when they customize the page.   This is a more complex problem and probably requires some more background about your use case. 

Let me know which this is. 
Photo of Rizvan Ansari

Rizvan Ansari

  • 382 Points 250 badge 2x thumb
first one is pretty easy..
m talking about second one
supposeuser has 5 field on the layout, user can remove 4 of them from the layout but should not able to remove one field(field is mandatory on the layout for him), Also he can add any no of fields in the account according to the need.
let me know if u need more clarification on the issue.
thanks for the help! 
Rizvan
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
At this point the only way to do this is as follows. 

1. Set up read only sharing as default on the Page object.  This means users will not be able to change pages they don't have rights to. 
2. Make a page that only has the required field on it.  (one field editor,  one field).  It should be owned in such a way that the end user will not be able to share edit rights with this page. 
3. Make a page with the rest of the fields in it.  This page should be owned in such a way that the end user will be able to have edit rights.  Maybe use criteria based sharing rules.
4. Use the Page include component to bring in the "required field page" into the editable page. 

This may seem like a hack,  but it is supported.