function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nisha110687Nisha110687 

Changing Layout on click of a Button

Hi,

 

We have an application that allows new requests.

 

On filling in the form, the user first saves a draft of it and then clicks on submit to finally submit it.

 

Requirement : Incase a user saves the draft but has not submitted it, he can come back to that request , edit it n then click submit. However another user also can now see this request and edit n submit it. This needs to be avoided.

 

Only the creator should be able to edit the request and submit. We have a read only layout. So any other user, shuold see the read only layout on clicking this request.

 

How can this be done?

 

Thanks in advance!

 

Nisha

jhenningjhenning

I would not use page layouts to secure your data. You should look at the Sharing security. I recommend downloading and reading the Developers Fundamentals book

 

http://wiki.developerforce.com/index.php/Force_Platform_Fundamentals

 

Chapter 7 has a good explanation on securing your data.