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
Praveen JhaPraveen Jha 

Workflow help-urgent

All the Accounts should become inactive automatically after end date.
Sonam_SFDCSonam_SFDC
I am assuming end date is a field on your Account detail page.

How do you qualify an account ot be inactive? Is there a check box on the Account detail page that is checked /unchecked to mark this status? If yes, you can create a workflow and make a fieldup as soon as the end date is crossed.
reference:https://help.salesforce.com/HTViewHelpDoc?id=workflow_defining_field_updates.htm&language=en_US
Praveen JhaPraveen Jha
sonam do it for custom object i m unable to do it
Sonam_SFDCSonam_SFDC
Sorry, didn't quite get that last update you gave..do you mean the end date is on a custom object record? 

Please explain the flow completely so I can suggest better..where is the end date field? is it on a custom object record? If yes,  do you want all the accounts related to this custom object record to be turned to inactive?
Praveen JhaPraveen Jha
Create one custom object like survey which should store details like survey ID, name, survey start and end date etc. and make  all the surveys become inactive automatically after survey end date

Sonam_SFDCSonam_SFDC
I suppose we would need to schedule a apex class(http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm)  in this scenario as I understand the custom object will not be updated daily( to be able to trigger the workflow we setup)

What you can do is -
1)create a checkbox on the custom object as I suggested, to mark the status of the survey as active/inactive
2)Write an apex clas to update the checkbox if the end date < TODAY()
3)Schedule this apex class to run every midnight so all surveys with past end date get checked as inactive.




Dev.AshishDev.Ashish
Praveen you have to use batch apex for this requirement. write batch apex class (and schedule it) that will Update all survey records for which end end has passed. more @ http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
Praveen JhaPraveen Jha
No i don't want to go through coding. I want to solve this requirement through declarative way
Sonam_SFDCSonam_SFDC
If we were updating the records everydays - we could have applied a workflow thus making this declarative.Is that the case in your setup? If yes, you can go with the worflow, set the trigger criteria to each time its updated and have the field update setup to update the checkbox.

CloudFzCloudFz
This request cannot be accomplished without writing Apex code.