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
Vinod Kumar 92Vinod Kumar 92 

A field with Label " No. of Total Placements" and this should have the total number of placements that we ever did with that account. If there are multiple placement records for the same contact then it should be counted as one.

Hi All,

I want code for below requirements, 
1. Placement object has a lookup relationship to Account and Contact, a field called "No. of Total Placements" on Accounts should be updated to show the number of Placements that are associated for a particular Account, however if multiple Placements are associated to the same Contact in different interval of time period which intern is associated to particular Account, then all those Placements which are associated to that Contact should be considered as 1 count under that Account.

    In this Placement object i hv one more requirement
2. A field with Label " No. of Active Placements" and this should have the total number of placements with Active status checked for that account

No i want code for both the requirements... pls can any body help me on this. Thanks in advance.
 
Carlos Campillo GallegoCarlos Campillo Gallego

Hi Vinod,

If you want someone to write the code for this project, you should post over on the AppExchange site where you can match up with a developer looking to work on your project. 

https://appexchange.salesforce.com/developers

Anyway, the first half of your first requirement could be fulfilled using Roll Up Summary fields if and only if your Placement object is a child of Account (Master-Detail relationship). I'm not sure of understanding what do you mean on the second half of the requirement, sorry.

Regards.