+ Start a Discussion
netTrekker_ADnetTrekker_AD 

Can Events be locked (uneditable) like Tasks can?

I currently have a Task VR going that simply prevents a Task from being edited once the Status is marked Completed.

 

Unforunately, Events do not have a Status field. Because of the quirky way Events act in Salesforce like Outllook events, is anyone familiar with an effective way to allow users to update and edit events up until they are completed and then essentially lock them? Is there a way to say "if now is greater than end time, then no can do" or something even easier than that, that I am missing?

 

Thanks in advance!

SteveMo__cSteveMo__c
Do you need it to be completely locked down, or do you want them to be able to reschedule and update "lapsed" events?
netTrekker_ADnetTrekker_AD

If the event is "completed" it needs to be completely locked down (except for system admins).

 

I see what you mean about "lapsed events". We really do not like the way events are handled in Salesforce as they fall into Activity History as soon as the end time passes regardless if they actually occurred or not.

 

I guess I could create a Status field that has to be manually changed to Completed and then required by a VR, then another VR that prevents any editing after the status is met.

 

SteveMo__cSteveMo__c

Man! you picked a tough one didn't you...  

I'm still working on it (but I may have to raise my rates)  :smileywink:

SteveMo__cSteveMo__c

Okay this isn't perfect, but it might get you closer to where you want to be:

 

The example below is for Opportunities, but the general principal does work on Events.  

 

 

 

How do I lock Opportunity Products using Workflow Field Update and new Record Types once the Opportunity Stage is Closed? (Pre-Winter 08)


With the Salesforce CRM Winter 08 release and Opportunity & Opportunity Product cross-object Validation Rules there is a better method of locking the Opportunity Products. This does not require changing Page Layouts and adding Record Types. Please refer to the new solution called: "How do I lock the Opportunity Line Items using Validation Rules once the Opportunity Stage is Closed?"

This solution may be preferred if you would like to remove visibility to the Opportunity Products or change a page layout to "read only" fields.

To use this solution you will create a new "closed" Opportunity Record Type, a new "closed" Opportunity Page Layout, and a Workflow Rule Field Update to automatically change the Record Type once Stage = Closed Won.

Follow these Steps:

1. Create a new "Closed" Opportunity Record Type similar to the existing Record Type

2. Clone the existing Page Layout and map the new Record Type to the new Page Layout

3. Alternately, you can make the new "Closed" Opportunity Page Layout have "read only" fields.

4. Remove the Product related list from the new Page Layout and save.

5. Create a workflow rule with the following criteria:
Rule Criteria (Opportunity: Stage equals Closed Won) and (Opportunity:
Has Line Item equals True)

6. Then create a workflow action (Field Update) to change the Opportunity
Record Type. Make sure to activate the Rule.

When the rule triggers the Opportunity Products will be removed from the Page Layout. You can view what Products are related to the Opportunity via reports. 

netTrekker_ADnetTrekker_AD
That just seems like a lot more work than just creating a custom activity field called Event Status, giving it the same picklist values as the Status field that tasks use, and creating a VR that makes it uneditable when the status is moved to Completed.
SteveMo__cSteveMo__c
Yeah, I hear yah...  Activities in general are a real F*cker to work with when it comes to VR's and WFR's.
netTrekker_ADnetTrekker_AD

I have everything laid out in a sandbox and in theory this works. The issue I have with it is that the user has to mark it Completed for the rule to actually work. Although this is how an Open Task gets completed, the difference is, when the Status field of a Task is not marked Completed by the Due Date, the task turns red and becomes overdue on the Home tab.

 

Any idea how to make Events do that or is that idea a wash because they fall into Salesforce's idea of "Completed" as soon as the start time hits, and they jump down into Activity History...

SteveMo__cSteveMo__c
I think it all boils down to the Activity.Date field, that's were it all seems to fall apart for me when I try to write an Event lock-down VR or WFR  
CasalaCasala

Can you share the VR syntax you used for the lock task rule as i would like to do the same. never mind I worked it out. I was trying to over complicate it

 

ISPICKVAL(PRIORVALUE( Status ), "Completed")