Creating an Application in SalesForce.com using Apex programming Language

Spread this useful information with your friends if you liked.

By: Ankita Kulkarni

Before moving to the practical let’s understand some important topics related to Salesforce.

What is Salesforce?
Salesforce provides software and services aimed at creating relevant customer experiences. Businesses can use Salesforce services to better connect with partners, customers, and potential. Companies can track customer activity, market to customers, and perform many other tasks using Salesforce CRM customers.

What are the services provided by Salesforce?

  • SAAS (Software-as-a-Service)
  • PAAS (Platform-as-a-Service)
  • IAAS (Infrastructure-as-a-Service)

Sign up to the Salesforce using the following link: 

https://developer.salesforce.com/signup

After signing up go to Setup and click on Developer Console

Now, in Developer Console click on File -> New -> Apex Class and Name it as Demo1

Note: If your Apex Class is disabled then signup through the given link: https://developer.salesforce.com/signup

1. Write the code to create an account.

Do not forget to save it.

Click on Debug -> Open Execute Anonymous Window and write the code and then Execute it.

You can see the record has been successfully added.

Similarly, you can add number of records. To retrieve the records go to Query Editor and type the query language and Execute it. 

You can see the records added.

2. Write the code to update the account.

Follow the same steps: File -> New -> Apex Class and name it as Demo2.

Again click on Debug -> Open Execute Anonymous Window and write the code.

To view the records in Salesforce 

3. Write the code to delete the records.

Follow the above steps: File -> New -> Apex Class and name it as Demo3. 

Again click on Debug -> Open Execute Anonymous Window and write the code.

To view the records in Salesforce go to Setup and search for Accounts and click on it.


Spread this useful information with your friends if you liked.

Leave a Comment

Your email address will not be published. Required fields are marked *