Another Salesforce blog!!!

Salesforce, Apex

April, 2017

actionSupport vs actionFunction

. Both actionSupport and actionFunction can be call to an Controller method using an AJAX request. * for example call controller onclick of a inputcheck box * or call a controller method onfocus of a input field Well, they both do the same thing of calling controller method. Difference between both: 1. actionSupport adds AJAX […]

Apex from Custom button or Javascript : Ajax toolkit


To call a webService method with no parameters, use {} as the third parameter for sforce.apex.execute . Favorite

lock record using SOQL so that it cannot be modified by other user

we will need “FOR UPDATE” clause of SOQL.


SOQL statement can be used to get all records even from recycle bin

We will need “ALL Rows” clause of SOQL.


enum in APEX


Custom settings: How to get the data


How to get all the required fields of sObject dynamically

There is no direct property available in Apex dynamic API to represent the required field. However there is another way to know about it. If any field have below three properties then it is mandatory field. If it is Creatable If it is not nillable and If it does not have any default value


get all the fields of sObject using dynamic Apex


create instance of sobject dynamically


get the list of all available sobject in salesforce database using Apex (Dynamic Apex)


Previous Posts