1 month ago • GCloudUp

For simple business automation, what would you choose?

Apex Trigger

Record-Triggered Flow

Workflow Rule

Process Builder

11 votes

2 months ago • GCloudUp

If the child object in a Master-Detail relationship needs to change its parent to a different master, what is the best approach?

Master-Detail relationships do not allow reparenting.

Check "Allow Reparenting" on the master-detail field settings.

Delete the child record and create a new one.

Change the relationship to a Lookup and back.

6 answered

2 months ago • GCloudUp

What is the maximum number of SOQL queries that can be issued in a single synchronous Apex transaction?

50

100

200

500

4 votes

2 months ago • GCloudUp

You are writing a trigger that needs to gather all Account records associated with a list of incoming Contacts in a single SOQL query.

Set accountIds = new Set();
for (Contact con : Trigger.new) {
    if (con.AccountId != null) {
        accountIds.add(con.AccountId);
    }
}
List accounts = [SELECT Id, Name FROM Account WHERE Id IN :accountIds];

Question: What is the primary reason for using a Set rather than a List in this bulkified code?

To prevent duplicates in the SOQL query and improve overall performance.

To avoid hitting the System.LimitException for query row limits.

To allow Trigger.new to be modified during the loop.

To sort the IDs alphabetically before executing the SOQL query.

4 answered

2 months ago • GCloudUp

You have two Lightning Web Components:

šŸ”¹ Parent Component
šŸ”¹ Child Component

The parent component needs to pass a recordId to the child component so that the child can display related information.

ā“ Question:
Which decorator should be used in the child component to receive data from the parent?

@wire

@track

@api

@AuraEnabled

4 answered

2 months ago • GCloudUp

2. By default, Apex test methods cannot access pre-existing data in your Salesforce organization. What is the minimum amount of code coverage required to deploy Apex to a production environment?

50%

66%

75%

100%

10 answered

3 months ago • GCloudUp

1. Which annotation is required to define an Apex class as a test class?

@isTest

@testClass

@TestSetup

@isTest(SeeAllData=true)

6 answered