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
Atul Shendge 2Atul Shendge 2 

create a new formula field which recalculate value

Hi All,
I have a situtation below.

Where I need to create a new formula field on Account Object which recalculate the value every time that the User invites to the same account to an "lunch" per year, this number will increase, but each new year, this number will refresh to '0'.

Example: if User 1 invite Account 'A' 1 time and User 2 invite the same Account 'A' 1 time, we would like to inform the User on system.
ankit bansalankit bansal
Hi Atul,
Formula fields cant trigger any system process as they are calcuated dynmicall whenever they are accessed.Since your requirement has 2 things-
1.Notifying the user
2.Every year making the number as 0.
To accomplish this requiremetn I would suggest you to utilise a scheduled batchjob which will run on the 1st of every year make the numebr field as 0, secondly I am assuming there is a junction object between account and user you can make use of a roll up summary field on account and a workflow or trigger to fire a process whenever the number of junstion object records on the account increases.