When to use public class and when to use global class?
Answer / Mukul Chaudhary
Public classes in Salesforce are accessible from any context (Apex code, Visualforce pages, etc.), but they must be used inside a namespace. Global classes, on the other hand, can be accessed without a namespace qualification, making them more flexible for reuse across different orgs and packages. However, global classes should only be used when necessary, as they may introduce potential naming conflicts and make your code less portable.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you create a roll-up summary field in a lookup relation? State the number of such fields to be created for an object.
Explain communities and sites in salesforce?
What is wrapper class in apex salesforce ?
What are the Exceptions Statements in salesforce?
What are the standard profiles in salesforce?
What is a governor limit in salesforce?
What are the types of soql statements in sales force?
What is lightning data services?
How do users see report headers while scrolling? What to do to enable this floating report header?
What is process builder? : salesforce process builder
How many types of email templates can be created in salesforce?
What is system.runas () is test class?