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
Auler CordobaAuler Cordoba 

Junction Object Easy

Hi community,

I am new at this.

My data model is as follows:

Salesforce Certification 1 ---- n Certification Held n ----- 1 Account

Data Model

So Certification_Held__c is my junction object between Salesforce_Certification__c and Account, since I have an n-n (many to many)

So far so good. Then, what I need is to make a trigger where it tells me how many Certifications (that is, I must use Certification Held) each Account has. This should happen every time the user does an update, insert, or delete.

It seems simple to me, but I can't do it.

So far what I have done has not given me the result I want....
 
Millie AllenMillie Allen
junction object is a custom object with two master-detail relationships, and it is the key to making a many-to-many relationship. A job posting fits into the space between positions and employment websites.
QuickPayPortal (https://www.quickpayportal.one/)
Auler CordobaAuler Cordoba
Thanks for the reply Millie Allen. I'm looking to solve using Apex. I need a Trigger.