Activity Forums Salesforce® Discussions What is difference between Global and Public keywords in Salesforce?

  • Ajay Prakash

    January 19, 2018 at 6:53 am

    Hi Ankit,

    These both are the access modifiers of apex class, methods, variables. Public means the method or variable can be used by any Apex in this same application or in the same namespace. Global provides a hieger level of access than Public.Any global method or variable can be accessed by any apex code that has access to the class not only from the same application but from outside the application. Global is not recommended, so use only when you need to give access to outside the application.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos