Monday 28 March 2016

Create Query From Developer Console

In our daily coding/administration life, we often write a query on Query Editor to get the list of rows and columns, it is not possible to remember all the API names present in the org. And this is time consuming task as every time we need to go back to see the API and copy n paste into the Query Editor.

To overcome this situation, Salesforce has provided a Create Query option from Developer Console, which is very easy to use.

Steps:

  • Open Developer Console
  • Click on File then click on Open, select Objects
  • Select the Object(Double Click) on which you want to make a Query
  • Select the Fields and click on Query button

Here you go, your query is ready to use.



Fix Indentation: Developer Console

While writing is quite big piece of code, sometimes we can not keep the indentation 100% correct. Although it is always a good practice to write a good piece of code with correct indentation, but in case there is a scenario to fix the indentation then it is a very tedious job.

There is a very cool feature provided by Salesforce to Fix the indentation of Classes, Pages and Components.

Steps:

  • Open Developer Console
  • Open the Class or Pages using File option
  • Go to Edit and select "Fix Indentation"

  • Click on Save or CTRL + S, your code is 100% correct now.

It is very easy to use and excellent feature provided by Salesforce.