Question 11: What is a Flow and how does it differ from Process Builder?
Answer:
Flow is a powerful automation tool that supports complex logic, loops, and user interactions. Process Builder is simpler and being phased out in favor of Flow.
Question 12: What are common Flow design best practices?
Answer:
Use sub-flows, avoid hardcoding IDs, handle errors gracefully, and test thoroughly. Use fault paths for error handling.
Question 13: What are Apex Triggers and how do you avoid recursion?
Answer:
Triggers automate logic on DML events. Use static variables or trigger frameworks to prevent recursion and manage bulk operations.
Question 14: How do you bulkify Apex code?
Answer:
Avoid DML or SOQL inside loops. Use collections (Lists, Maps, Sets) and process records in bulk to respect governor limits.
Question 15: How do you bulkify Apex code?
Answer:
SOQL is Salesforce’s query language. Optimize by selecting only needed fields, using indexed fields in WHERE clauses, and avoiding nested queries when possible.
Question 16: What is a Connected App and how is it used in integrations?
Answer:
A Connected App enables external applications to connect to Salesforce via OAuth. It defines scopes, callback URLs, and security policies.
Question 17: How do you handle authentication in Salesforce integrations?
Answer:
Use OAuth 2.0 for secure token-based authentication. Options include JWT Bearer Flow, Username-Password Flow, and Web Server Flow.
Question 18: What are common Apex errors and how do you handle them?
Answer:
Common errors include DMLException, QueryException, NullPointerException. Use try-catch blocks and custom error logging.
Question 19: What is the Singleton design pattern in Apex?
Answer:
Singleton ensures a class has only one instance and provides a global point of access. Useful for managing shared resources or configurations.
Question 20: How do you debug performance issues in Salesforce?
Answer:
Use debug logs, check governor limits, analyze SOQL queries, use Developer Console’s Execution Overview, and optimize triggers and flows, Salesforce optimizer.
