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
CHughesCHughes 

Lock field after initial entry

I need to be able to lock down the due date on assigned tasks so that the assignee cannot change it without permission from the user assigning the task.
BrunoMBrunoM

You could create a validation rule preventing that date field from being altered if the person making the change is not the person who created the task.

 

Something like this:

 

AND( ISCHANGED( ActivityDate ) ,
$User.Id = Parent.OwnerId
)

This would prevent the owner of the Task from changing the date. You could further limit it so that only the creator of the taask can change the date.
 
Hope this helps. 
CHughesCHughes
I attempted adding the validation rule as written and got the following error: 
Error: You referenced an unsupported field type called "Date/Time" using the following field: ActivityDate
Any ideas?  I certainly appreciate your input.  This would be a tremendous help if we can get it to work.
Kent ManningKent Manning
Yes, unfortunately Salesforce doesn't allow you to get access to the Activity Date.  I've tried and not been successful at doing it.  I don't believe there is a way to do this...at least natively.  If you are proficient with Apex then you might be able to do it that way.
JakesterJakester
If this frustrates you (and why wouldn't it) - vote to fix it here.
BrunoMBrunoM
Wow, that's unfortunate. I voted  for it!
Kent ManningKent Manning
I cast a vote for this also.  Thanks for sharing it Jakester.
rsathiarsathia

Hi,

 

Is this possible with a text field? We have a Case Comments section in our Case Page layout and when someone clicks on the "New" button and puts a comment in there I'd like for that lock and be uneditable.