CSA Developer Fundamentals 4 — Questions and Answers
Question 1: In Salesforce, what is an 'External ID' field used for?
- Storing Salesforce's internal record ID
- Mapping records to identifiers from external systems for upsert operations (Correct answer)
- Creating relationships to external objects
- Restricting field access to external users
Correct answer: Mapping records to identifiers from external systems for upsert operations
An External ID field stores a unique identifier from an external system and enables upsert operations via the API.
Question 2: Which Salesforce deployment method allows packaging of components into a ZIP file for deployment using the Metadata API or Salesforce CLI?
- Change Sets
- Unmanaged Packages
- ANT Migration Tool / Salesforce CLI (Correct answer)
- AppExchange Packages
Correct answer: ANT Migration Tool / Salesforce CLI
The ANT Migration Tool and Salesforce CLI use a package.xml manifest file and ZIP-based deployment via the Metadata API.
Question 3: What is the role of a 'Test Class' in Salesforce Apex?
- A class that defines data models
- A class written to verify Apex code behavior and meet the 75% code coverage requirement (Correct answer)
- A class used only in sandbox environments
- A template class for creating other classes
Correct answer: A class written to verify Apex code behavior and meet the 75% code coverage requirement
Test classes contain unit tests that validate Apex logic and are required to achieve the 75% code coverage threshold for deployment.
Question 4: Which type of Salesforce relationship creates a parent-child link where the child record's sharing and security are controlled by the parent?
- Lookup Relationship
- Many-to-Many Relationship
- Master-Detail Relationship (Correct answer)
- Hierarchical Relationship
Correct answer: Master-Detail Relationship
In a Master-Detail relationship, the child record inherits the parent's sharing settings and is deleted if the parent is deleted.
Question 5: What is the function of the '@future' annotation in Apex?
- Schedules a method to run at a specific future date
- Marks a method to run asynchronously in a future transaction (Correct answer)
- Caches method results for future calls
- Flags a method for future refactoring
Correct answer: Marks a method to run asynchronously in a future transaction
The @future annotation causes a method to run asynchronously in a separate transaction, useful for callouts from triggers.
Question 6: In Salesforce Flow, what is a 'Record-Triggered Flow'?
- A flow started manually by a user clicking a button
- A flow that automatically runs when a record is created, updated, or deleted (Correct answer)
- A flow scheduled to run at a specific time
- A flow invoked by an API call
Correct answer: A flow that automatically runs when a record is created, updated, or deleted
A Record-Triggered Flow fires automatically based on database events like record creation or field changes, replacing workflow rules and triggers.
Question 7: What does the 'WITH SHARING' keyword enforce in an Apex class?
- The class can be shared between multiple orgs
- The class respects the running user's record-level sharing rules (Correct answer)
- The class shares its methods with other classes
- The class allows sharing of its data to external systems
Correct answer: The class respects the running user's record-level sharing rules
With Sharing enforces the current user's org-wide defaults, role hierarchy, and sharing rules when querying records.
In Salesforce, what is an 'External ID' field used for?