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
MaverickDevMaverickDev 

Lock picklist for every SF user and should be updatable using Apex web service

Hi,

 

I've a custom picklist field in contact section. I wish to lock it, so any SF user can not change value of the same. And I have Apex web service which updates contact section including mentioned picklist value. I've code in .NET which call apex web service and send values to SF and update the contact!

 

I've tried it using validation rule butit was not allowing to update record from my .NET code also.

 

So how do I achieve the same? any specific validation rule will help?

 

Thanks!

 

 

 

 

sfdcfoxsfdcfox

You can make it read-only on the page layout.

MaverickDevMaverickDev

Thanks!

Do I need to add respective page layout in package? How it (read only custom field ) will get reflected after installation on respective section (e.g. contact/lead)? Or do I need to write permission set?

sfdcfoxsfdcfox

If this is for an installable app, you'll probably have to include that in the documentation-- the field must be made read-only. Packaging page layouts only leads to sorrow and pain (at least, as it stands today).