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
sssssssssssssssssssssss ssssssssssssssssssssssss s 

Is it possible to Dynamically calculate the count of records and populate in other Object?

Hi Team,

I have a requirement where in the Contact object cannot have more than X number of Contacts for an "Agency Location" and "Agency Type" fields for a "Role" field.

"Agency Location" and "Agency Type" field are single select picklist. "Role" field is a multiselect picklist.


Planning to store that count for agency and location combination for each role in another object.

How do I update the count of number of contacts based on the "Agency Location" and "Agency Type" combination for a "Role" into another object?

Many Thanks in advance for all your help and support!