Global
The method or variable with the global access modifier can be used by any Apex code that has access to the global class. This access modifier should be used for any class or method that needs to be referenced from outside the Salesforce application, like web services, SOAP, or REST services. I rarely recommend this modifier, because this is the most open modifier. Most of the time, this type is used to define web services and integrations with external applications (from the application to Salesforce).
You know the different types of access modifiers. Now, you should know the solution to our previous question: Why did we receive an error in the Developer Console?
If you checked the access modifier on the method, it is defined as
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access