Salesforce Admin – Objects, Fields & Relationships Questions
Understanding objects, fields, and relationships is fundamental to data modeling in Salesforce. These questions cover standard and custom objects, field types, relationship types, schema builder, formula fields, field history tracking, and external IDs. Mastering these concepts will help you design effective data models that support business processes.
Objects, Fields & Relationships - Q&A
- Q1. What is an object in Salesforce?
Ans: An object in Salesforce is like a database table that stores data. There are two types: Standard Objects (like Account, Contact) and Custom Objects created to meet specific business needs. - Q2. What are fields in Salesforce and how are they different from records?
Ans: Fields are columns in an object, defining the type of data stored (like Text, Number, Picklist). Records are individual rows of data within that object. - Q3. What types of relationships are available in Salesforce?
Ans: Salesforce supports: Lookup Relationship, Master-Detail Relationship, Many-to-Many (using Junction Object), and Hierarchical Relationship (specific to User object). - Q4. What is a Lookup Relationship?
Ans: A Lookup Relationship links two objects loosely. The child record is not dependent on the parent and won't be deleted when the parent is. - Q5. What is a Master-Detail Relationship?
Ans: A tightly coupled relationship where the child record depends on the parent. Deleting the parent deletes the child, and security/sharing is inherited. - Q6. What is a Hierarchical Relationship?
Ans: A Hierarchical Relationship is a special type of Lookup available only on the User object. It allows users to reference other users, useful in building management structures or org hierarchies. - Q7. What is a Junction Object?
Ans: A custom object used to create a many-to-many relationship between two objects by having two Master-Detail relationships. - Q8. Can a custom object have both Lookup and Master-Detail relationships?
Ans: Yes, a custom object can use both, based on the required data model. For instance, Invoice may have a Lookup to Customer and Master-Detail to Order. - Q9. What is Schema Builder and how do you use it?
Ans: Schema Builder is a drag-and-drop tool to view and modify objects, fields, and relationships visually, helpful for quickly understanding data models. - Q10. What is a Formula Field and where have you used it?
Ans: A Formula Field calculates a value based on other fields. I've used it to calculate age from DOB or dynamically display discount messages. - Q11. What's the difference between a Standard Field and a Custom Field?
Ans: Standard Fields come out-of-the-box (e.g., Name, Created Date). Custom Fields are user-defined to meet specific needs (e.g., Status__c). - Q12. Can we convert a Lookup relationship to Master-Detail?
Ans: Yes, but all child records must have a parent record; otherwise, Salesforce won't allow the conversion. - Q13. What is a Roll-Up Summary Field?
Ans: A Roll-Up Summary Field performs calculations (SUM, COUNT, MIN, MAX) on related child records in a Master-Detail relationship. - Q14. What is Field History Tracking?
Ans: It tracks changes made to selected fields, helping with audits. For example, I enabled it to track changes in Opportunity Stage. - Q15. What is an External ID and when would you use it?
Ans: An External ID uniquely identifies a record from an external system. I use it during data imports and integrations for record matching. - Q16. How many Master-Detail relationships can a custom object have?
Ans: A custom object can have up to two Master-Detail relationships. - Q17. What are the limitations of a Lookup Relationship in Salesforce?
Ans: Lookup does not support cascade delete by default, no roll-up summary can be created directly, doesn't inherit security from parent, up to 40 lookups per object, and doesn't enforce referential integrity unless required field is checked. - Q18. What are the limitations of a Master-Detail Relationship?
Ans: Child record cannot exist independently, inherits parent security/ownership, only 2 Master-Detail relationships per object, standard objects can't be detail side, roll-up summaries only work with Master-Detail. - Q19. What are the limitations of Roll-Up Summary Fields?
Ans: Only available for Master-Detail relationships, maximum 25 per object, only supports SUM, COUNT, MIN, MAX, cannot summarize fields from non-Master-Detail child objects. - Q20. What are the limitations of a Lookup vs Master-Detail relationship in terms of child record behavior?
Ans: In Lookup, child can exist independently and isn't deleted with parent. In Master-Detail, deleting parent automatically deletes child.