This article concerns real-time and knowledgeable Salesforce Interview Questions 2025. It is drafted with the interview theme in mind to provide maximum support for your interview. Go through these Salesforce Interview Questions 2025 to the end, as all scenarios have their importance and learning potential.
To check out other interview Questions:- Click Here.
Disclaimer:
These solutions are based on my experience and best effort. Actual results may vary depending on your setup. Codes may need some tweaking.
1. What happens to related records when you delete a parent record in a master-detail relationship?
- Child records automatically get deleted – this is cascade delete behavior
- Example: If “Swimming” (Club) is deleted, and “Aziz” is the only member, Aziz’s membership (child) also gets deleted
- This ripple effect continues through any dependent relationships
2. In a lookup relationship, what happens when you delete the parent record?
- Nothing happens to the child records
- Lookup is loosely coupled, so deletion of one doesn’t impact the other
- Useful when the relationship isn’t mandatory or when records must remain independent
3. If “Device” is the one side and “Employee” is the many side, where should you create the master-detail relationship?
- Always on the “many” side
- So in this case, the relationship field must be created in the “Employee” object
- This tells Salesforce each employee is linked to one device
4. Why can’t we reverse a master-detail relationship once it’s already established?
- Because the child cannot become a master in the same structure
- Salesforce restricts circular dependencies to prevent recursive deletion or data conflicts
- It’s a one-directional parent-child architecture
5. How do you model many-to-many relationships in Salesforce?
- Use a junction object (e.g., “Membership”)
- Create two master-detail relationships: one with “Employee”, one with “Club”
- Each record in the junction links one employee to one club, allowing cross-mapping
6. Why can’t you create a roll-up summary field on the “Membership” object?
- Roll-up summary fields are allowed only on the master side of a master-detail
- “Membership” is the child in both its relationships, so it’s ineligible
- Salesforce limits one child to two master-detail relationships max
7. How do roll-up summary fields work in Salesforce?
- They summarize data from related child records
- Example: “Number of Devices”, “Number of Memberships”, or “Total Membership Fee” on Employee
- Only available on master (parent) objects in master-detail relationships
8. Why did the page layout show half-baked data in the related list?
- The page layout didn’t include essential columns like device type or club name
- Fixed by editing the related list view and adding necessary fields like “Membership Fee”, “Club”
- Improves user visibility and navigation
9. Why do you need to add blank spaces in page layout sections?
- Salesforce page layouts follow a zig-zag layout pattern (left-right-left)
- To properly align fields, especially when skipping columns, blank spaces help maintain structure
- Example: Aligning “Total Membership Fee” to appear to the right of “Number of Memberships”
10. Why can’t a child in Salesforce have more than two master-detail relationships?
- Salesforce enforces a strict rule: one child object can have maximum two master-detail relationships
- Ensures data integrity and performance
- “Membership” already has two: one with “Employee”, one with “Club” – so can’t add more
11. How does Salesforce distinguish between standard and custom fields when referencing them?
- Standard fields come with objects by default (e.g. Name, Created Date)
- Custom fields end with “__c” (e.g.
Membership_Fee__c
) - Important for clarity when writing code, formulas, or doing API integration
12. What’s the significance of using a junction object vs. a direct lookup for many-to-many?
- Junction object gives you control: can add fields (e.g., fee, status)
- Lookup alone can’t model membership fee or join date
- It also enables reporting on relationship data directly
13. Can a lookup relationship be made mandatory like a master-detail? How?
- Yes, by setting “Required” on the lookup field at the field-level or in layout
- Still behaves like lookup (no cascade delete), but record can’t be saved without a parent
- Useful when deletion shouldn’t cascade, but parent must exist
14. What’s cascade delete vs. restricted delete?
- Cascade delete: child records auto-deleted (master-detail)
- Restricted delete: prevent deletion of parent if any child exists
- Lookup with “What to do when parent is deleted?” set to “Prevent delete” gives restricted behavior
15. What’s the limit to how many master-detail fields you can have in one junction object?
- Max two master-detail per object
- Because this object must serve as junction; no more chained parents allowed
- Exceeding leads to Salesforce error during field creation
16. In your example, after deleting “Swimming” club, why don’t employee records disappear?
- You used junction object (“Membership”), not a direct master-child
- So deleting master “Club” deletes junction records, but not employees
- Employees remain intact—keeps data safe and avoids unwanted data loss
17. What types of fields can you summarize in roll-up summary?
- COUNT of child records
- SUM of numeric fields (currency, number)
- MIN/MAX on date, number fields
- Doesn’t support summarizing text or lookup types
18. Can roll-up summaries calculate across multiple levels of relationships?
- Only direct master-detail child level
- No “grandchild” roll-ups natively—would require triggers, flows, or declarative tools
- Best practice: build hierarchy carefully, consider reporting needs upfront
19. Why did instructor switch to Salesforce Classic to view roll-up summaries?
- Roll-up summary fields sometimes don’t immediately surface in Lightning compact layout
- Classic often displays freshly created roll-ups without layout edits
- Layout refresh may be quicker in Classic for proof-of-concept
20. How would you refresh Lightning page layout to surface new fields?
- Edit the compact layout or record page in Lightning App Builder
- Add the roll-up summary fields in the layout sections
- Save and refresh — then Lightning will show updated data without switching to Classic
21. What’s the difference between compact layout and page layout?
- Compact layout: defines key fields visible in the mobile and highlight panel
- Page layout: controls all fields, sections, related lists on desktop and edit pages
- Both should be synced to improve user experience
22. Why is field-level security important for security compliance?
- Controls which profiles can view or edit specific fields
- Hides sensitive data (e.g., SSN) from unauthorized users
- Acts at the system layer—regardless of layout or page — hidden in APIs too
23. How do you enforce object-level security for a new custom object?
- Remove or add its tab in app and profile settings
- Profiles determine visibility via “Object Settings”
- If hidden, the object won’t appear even if fields are visible
24. Why didn’t “Membership” need a tab?
- Junction objects often don’t require tabs—they’re backend relationship tables
- Visibility controlled through related lists on parent objects
- No UI clutter, but still fully accessible when needed
25. Why set login IP ranges when cloning a profile?
- Prevents login from unauthorized locations—security hardening
- Ensures users can log in only from defined IPs
- Standard best practice in high compliance orgs
26. What’s difference between Standard and Platform license?
- Salesforce license: full CRM functionality (opportunities, leads)
- Platform license: custom objects, but no standard CRM objects
- Enables lighter-cost users focused on internal apps
27. Why create separate profiles like JSR and Legal?
- Define granular access per role
- JSR (Junior Sales Rep) has different field/edit capabilities than Legal
- Segmented access prevents data leakage and aligns with responsibilities
28. Where do you define role for a user and why does it matter?
- Roles are set on the user record
- Affects record-level sharing (i.e. whose records you can see)
- Profiles control object/field access; roles handle hierarchies and sharing
29. How do you handle data-level security in this scenario?
- Use role hierarchy, sharing rules, or org-wide defaults
- Here, set OWD to Private so users see only their own records
- Use share rule or role hierarchy to open access as needed (e.g., manager sees rep’s records)
30. Why create test Accounts with a JSR user?
- Practical demo showing that profile and sharing settings work as expected
- Helps validate that JSR can create and see only their own data
- Supports hands-on verification of access boundaries
31. How do profiles affect tab visibility?
- In profile settings under “Assigned Apps,” you control which tabs they see
- Adding object tab to app makes it visible in app navigation
- Removing it hides object entirely—even if data exists
32. Can a profile have multiple permission sets?
- Yes! Users can be assigned multiple Permission Sets in addition to their Profile
- Lets you grant extra permissions without cloning profiles
- Clean, modular permission design
33. How do you automate deletion of related child/junction records in lookup?
- Use Flows or Apex triggers to delete child when parent is removed
- Better than cascade manually—gives controlled, audited, extensible behavior
34. When to use lookup + Flow vs. master-detail?
- Use lookup when cascade delete not desired or parent can change
- Add Flow when deletion automation needed but strong coupling isn’t
- Balances control and automation without risking orphaned records
35. What happens to sharing when you change master-detail to lookup?
- Changing from MD to lookup removes roll-up summaries, cascades, and inheritance
- Also affects sharing: MD inherits sharing, lookup doesn’t
- Must rebuild data access and summaries manually
36. In what scenario would record-triggered flow be better than roll-up summary?
- When needing cross-object grandchild calculations
- When syncing across lookup relationships
- Flow can conditionally aggregate or filter amounts in complex ways
37. Why add currency default (e.g., ₹35) for Membership Fee?
- Ensures baseline value and prevents zero/null records
- Covers common scenario (e.g., membership fee set for all new records)
- Improves data consistency and reduces form errors
38. What challenges exist when aligning page layout sections?
- In Lightning, layout is fixed columns—hard to place fields arbitrarily
- You may need blank fields/spacers to structure zones
- Planning UI upfront makes drag‑drop easier later
39. Why did instructor organize sections into “Personal Info” and “Prof Info”?
- Improves end-user experience—easy to scan form
- Logical separation of demographic vs. business data
- Better for new users & reduces cognitive load
40. Why clone standard profiles instead of customizing existing?
- Preserves default settings—less risk to break standard behavior
- A clean slate allows you to tweak without impacting org-wide profiles
- Roll backs easier when customizations isolated
41. What must you do after creating new users?
- Set/reset password via email verification link
- Log in as user (or impersonate) to verify UI, settings, access
- Confirm tabs, related list visibility, record‑level permissions working as expected
42. What’s alias vs. nickname on user record?
- Alias shows in collaboration areas (e.g., Chatter feed)
- Nickname used for email to field mapping
- Helps identify users without exposing full names
43. What’s difference between simple lookup and external lookup?
- Simple lookup links two Salesforce objects
- External lookup references records stored outside Salesforce (e.g. Heroku DB)
- Enables Master Data Management across systems
44. How do roles and profiles work together?
- Profile grants object/field-level access
- Role controls record visibility through role hierarchy
- Both are needed for full access control model
45. What if two master-detail relationships exist in one junction — how define ownership?
- Child’s ownership and sharing inherited from both masters
- Sharing is dictated by choice of “Sharing Setting” when creating second MD
- Junction record access might need special consideration
46. Why are login IP ranges important for security?
- Limit sign-in locations—mitigate brute force or remote attacks
- Compliments 2FA or SSO in reducing risk
- Often mandatory for regulated industries
47. Can you change a master-detail to lookup after creating junction?
- Yes, but you lose roll-up summaries and cascade behaviors
- Child records remain, but you must manually adjust sharing
- Salesforce will prompt warning—plan before switching
48. Why test as every user type after setup?
- Validates real-world usage
- Helps catch missing access on tab, record, field levels
- Avoids “gotchas” in deployment—user acceptance testing
49. How would you track membership history (changes over time)?
- Add audit fields in “Membership” (e.g., Start Date, End Date)
- Use field history tracking for fee or status changes
- Or build custom object “Membership History” with triggers/flows
50. How you would clean up orphaned junction records?
- Use Scheduled Flow or Apex to find memberships without valid parent
- Run daily batch to delete or alert on orphaned records
- Maintains data hygiene and avoids clutter