Salesforce Interview Questions Answers

43. What is the default timeout period while calling webservice from Apex.

                10Sec

44. We have a “Time Based Workflow” and there is Action scheduled to be executed. If we Deactivate the workflow, Scheduled actions will be removed from queue or not?

                Action will be performed even if we are deactivated the workflow.

45.  How to delete “Time based workflow” if there is already an action scheduled?

                We can’t delete the “Time based workflow” if any pending actions in the queue.

46. How to update the record using After Trigger context? 

                Not possible. You will get error like “Record is Read only”.

47. What is the difference between “Export” and “Export All” in Data Loader in Salesforce?

                Export is export all the data from Salesforce.com excluding the recycle bin’s data.

                Export All is export all the data from Salesforce including the recycle bin’s data.

48. What is the use of “ALL ROWS” in SOQL?
                ALL ROWS is used for retrieving the records from recycle bin.

                         Ex:  SELECT Id from Campaign ALL ROWS

                        -> “ALL ROWS” is not work in developer console.

49. What is the use of “FOR UPDATE” in SOQL?

                FOR UPDATE is used to lock the records.

                Ex:  Campaign cam = [SELECT id FROM Campaign LIMIT 1 FOR UPDATE];

50. What is the use of “savepoint” in apex?

This is will use for to roll back the changes.

51. How to call Apex class using java script?
 Check the below code.

  Apex Class:

global class ClassName{

      webService static String methodName(String camName) {

            Campaign cam = new Campaign(name = camName);

            return cam.name;

       }

}

Java Script:

var Campaign = sforce.sObject(“Campaign”);

var String = sforce.apex.exceute(“ClassName”,”methodName”,{name=”ABC”});

52. How to run trigger in asynchronously?

                If you use @FUTURE annotation trigger run asynchronously.

53. We are not providing some of fields in .csv file which are required in page layout level. What      happens if we try to insert records into Salesforce through data loader?               

                 All records are inserted in Salesforce successfully.

54. We are not providing some of fields in .csv file which are required in Filed level. What      happens if we try to insert records into Salesforce through data loader?

                Except those records remaining records will be inserted into Salesforce.