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
NalinakuNalinaku 

Temporarily Disable Users updating forecasts

I have a need to disable users from entering their forecasts during certain period of time in a week. For example, every monday from 9am to 11am.
How can this be scheduled ? 
I am thinking of turning off the Forecast tab in the Profile > Object Settings using apex, but not sure if this can be done. 
Please advise available options  
 
AnudeepAnudeep (Salesforce Developers) 
Hi Nalinaku, 

Can you try the following manually through UI first? it if works, you can write a scheduled apex to do the same
  • From Setup, enter Users in the Quick Find box, then select Users.
  • For each user that you want to enable, click Edit.
  • Under General Information, de-select/select Allow Forecasting.
  • Save your changes.
Let me know if it helps

Anudeep
NalinakuNalinaku
Thanks Anudeep. The problem with this is if we disable forecasting at user level and if the user is designated as a territory forecast manager, then he would be gone as forecast manager. That would be another task to add him back to his territory.