14.0k views
5 votes
A user has requested a field that counts the number of child records associated with a custom object. These custom objects have a lookup relationship between each other, which feature would best accomplish this requirement?

A. Apex Trigger
B. Roll-Up summary field
C. Lightning Process Builder
D. Visual Flow

User Crlb
by
5.6k points

1 Answer

0 votes

Answer:

A. Apex Trigger

Step-by-step explanation:

Apex Trigger: A trigger that gets executed before and after a record is Inserted/Updated/Deleted from the force.com database.

Syntax:

Trigger <trigger name> on <Object name> (trigger Events)

{

// your Logic here

}

Usually we use triggers when we have to perform such operations that are based on some specific conditions to modify related records. with Apex you can do SOQL and DML operations including;

Insert

Update

Delete

Merge

Upsert

Undelete

User Nsantana
by
4.6k points