PWC Salesforce Interview Questions | Pwc salesforce interview questions for experienced: If you are looking for pwc india salesforce developer interview experience then you are on the right place Here we have covered Salesforce Interview Question for 3 years experienced Candidates.
PWC Selection Process for salesforce developer:
There will be total 3 round in PWC company for the role of Salesforce Developer Role
- Technical Round (Online)
- Techno Managerial Round
- HR Round (Salary discussion).
PWC Salesforce Interview Questions:
Question 1. Difference between custom metadata and custom setting
Answer: Custom Metadata and Custom Settings are both used to store configuration data, but they have distinct differences:
- Custom Metadata:
- Records are metadata and are deployable between orgs.
- Accessible in formula fields, validation rules, and flows.
- Ideal for configurations that are part of the app’s metadata.
- Custom Settings:
- Records are data and are not deployable directly.
- Accessible in Apex via SOQL.
- Suitable for user-specific or org-wide settings.
Question 2. Use case of custom label other than translation
Answer: Custom labels can be used to:
- Display error or success messages dynamically in Apex classes and triggers.
- Store reusable text for emails or UI elements, ensuring centralized management.
- Maintain configurable values used across multiple components or classes.
Question 3. A sharing setting is created in such a way that whenever a field of obj A is abc then record is shared with user with read and write access. OWD of the obj is private and the user has read access to the object. But the user is only able to read the record and not able to edit. Why?
Answer: The user cannot edit the record because their profile or permission set does not have “Edit” access to the object. Sharing rules only grant additional record-level permissions; they do not override object-level permissions.
Question 4. Trigger – whenever phone field of account obj is updated, related contact records phone field has to be updated.
Answer:
trigger UpdateContactPhone on Account (after update) {
List<Contact> contactsToUpdate = new List<Contact>();
for (Account acc : Trigger.new) {
if (acc.Phone != Trigger.oldMap.get(acc.Id).Phone) {
for (Contact con : [SELECT Id FROM Contact WHERE AccountId = :acc.Id]) {
con.Phone = acc.Phone;
contactsToUpdate.add(con);
}
}
}
if (!contactsToUpdate.isEmpty()) {
update contactsToUpdate;
}
}
Question 5. There is an LWC component with an input element and a button. On click of the button the user record matching the input value should be deleted. There is no error in the code, but the record is not getting deleted. What could be the reason?
Answer: Possible reasons include:
- The user does not have “Delete” access to the User object.
- The record is a system admin user or a special user that cannot be deleted.
- The deletion logic is in an Apex class that is not executed due to missing @AuraEnabled annotation or incorrect wiring.
Question 6. Component A has a button. On click of the button, Component A should get account ID from Component B and show the record detail page of the account.
Answer: Use Lightning Message Service (LMS) or Pub-Sub mechanism:
- Component B publishes the Account ID using LMS.
- Component A subscribes to the message and navigates to the record detail page using the navigation service.
Question 7. I have two endpoints to be used in a service:
- a.
https://www.google.com/translate
- b.
https://www.google.com
Do I need two named credentials created for this? - Answer: No, you can use one named credential (
https://www.google.com
) because the domain is the same. The path (/translate
) does not require a separate named credential.
Question 8. Difference between named credentials and remote site setting
Answer:
- Named Credentials:
- Simplifies authentication with external systems.
- Allows the storage of credentials and automatically handles authentication.
- Remote Site Setting:
- Only allows specifying URLs that Salesforce can call out to.
- Does not handle authentication.
Question 9. I want to deactivate a trigger without doing deployment to production. How to do that?
Answer:
- Use Custom Settings or Custom Metadata to add an “Active” flag for the trigger logic.
- Check the flag in the trigger before executing the logic. If the flag is false, bypass the logic.
Question 10. When will you use platform events and other events in LWC?
Answer:
- Platform Events:
- Use for real-time, asynchronous communication between Salesforce and external systems.
- LWC Custom Events:
- Use for component-to-component communication within Salesforce.
Question 11. How will you call a future method from a batch class? Is the execute method in the batch class asynchronous or synchronous?
Answer:
- You cannot call a future method directly from a batch class.
- Use Queueable Apex instead, as it can be called from batch classes.
- The execute method in a batch class is asynchronous.
Question 12. Is the final method synchronous or asynchronous?
Answer: A final method in Apex can be either synchronous or asynchronous, depending on how it is invoked.
Question 13. Difference between future and queueable
Answer:
- Future: Simpler, allows callouts, no chaining.
- Queueable: Supports chaining, allows callouts, provides job ID for tracking.
Question 14. How will you handle error in flow?
Answer:
- Use Fault Connectors to define error handling paths.
- Log errors in a custom object or send error notifications using email alerts or Apex actions.
- Display user-friendly error messages using screens.
Check Other Companies Salesforce Interview Experience:
- Cognizant Salesforce Interview Experience:Â Click Here
- Infosys Interview Experience:Â Click Here
- TCS Interview Experience:Â Click Here
- Deloitte Interview Experience:Â Click Here
- Accenture Interview Experience:Â Click Here
Follow Us for Daily Salesforce Jobs Hiring Update:
Social Platform | Links |
---|---|
Telegram | Join Here |
Join Here | |
Follow Here |
Conclusion:
We have covered PWC India Company Salesforce Interview Questions for 3 years experienced candidates if you have an Interview in upcoming days then you can revise these topics and Bookmark this page.