How to get Salesforce.com Organization ID?

To get Salesforce.com Organization ID, Go to Administration Setup --> Company Profile -->  Company Information -- > Salesforce.com Organization ID.


In Formula Field:


In Apex Class:

UserInfo.getOrganizationId();

In Visualforce page:

{!$Organization.Id}

Cheers!!!

2 comments:

  1. how to get Org Id using Formula field ?

    ReplyDelete
    Replies
    1. Check the post. I have updated it will all possible ways.

      Delete