Hello friends, in this article we are going to see about Salesforce APEX Multiple Choice Questions with Answers | Salesforce APEX Objective type questions with answers
52.In Apex, all variables and expressions have a data type?
53.Identify the invalid trigger event from the following
a. Before undelete
b. After insert
c. Before update
d. After delete
54.In Apex, all variables and expressions have a data type?
55.A user inserts data on a VF page that invokes an Apex Trigger, which calls an SObject.addError()
method. Which statement is true?
A. The error message will be displayed, provided the component included the page
B. The error message will be displayed next to the field causing the error
C. The error message will not be displayed unless the field specific sObject.field.addError() method is
D. The error will not be displayed as the Apex Errors are only recorded in the debug log
56.Identify the valid statements with respect to the encrypted fields. Choose four most appropriate options.
A. Encrypted text fields can be an external ID and can have default value
B. Encrypted fields are not searchable and cannot be used to define………..
C. Encrypted fields can be included in search results, report results ……..
D. They are not available for use in filters such as list views, reports and rule filters
E. Encrypted fields are not available in lead conversion, workflow, formula fields, outbound messages,
default values and ………forms
57.You as a Apex Developer want to execute a code when 4 records of Offer__c object are updated. Which you will use to write your code?
A. Apex Web Service
B. Apex Trigger
C. Apex Unit Test
D. Apex Callouts
58.A developer wrote an Apex code with SOQL embedded as given below. The Accounts Manager
position does not exist in the database. What error message will be displayed?
Position__c position= [SELECT Status__c, Approval_Status__c FROM Position__c WHERE
A. List has zero rows for assignment to Sobject
B. List has 0 rows for assignment to Sobject
C. List has no rows for assignment to Sobject
D. List has many rows for assignment to Sobject
59.Identify the correct trigger context variable which shows the currently executing code is Apex
trigger. Choose most appropre option:
60.What is the default option to scope of fields to search in SOSL statement?
A. NAME FIELDS
B. SIDE FIELDS
C. ALL FIELDS
D. PHONE FIELDS
61.Which triggers are invoked when two contacts are merged? Choose most appropriate option.
A . Only delete and update contact triggers
B. Only delete and update triggers on the parent account
C. No triggers
D. Delete and update contact and triggers and triggers on the parent account.
62.An org has a Candidate object with First Name and Last Name fields as required. A developer is
trying to insert a candidate programmatically by following code. What execption will be raised?
Candidate__c candidate = new Candidate__c(First Name__c = ‘Andrew’); Insert candidate;
A. Index Exception
B. Query Exception
C. NullPointer Exception
63.In Developer Edition how much storage space we get when we sign-up for org?
64.In which salesforce instances would there be identical record IDs? Choose most appropriate option
A. Production and Config Only Sandbox
B. Production and Developer Sandbox
C. Production and Full Sandbox
D. Record Id’s are always different in different environment
65.A developer wrote an APEX code write SOQL embedded as given below. There are five positions for
IT dept. What error message will be displayed?
Position__C position = (select Status_C, Approval_Status_c From position__c Where department_C=
a) List has more than one row for assignment Sobject
b) List has multiple rows for assignment to Sobject
c) List has many rows for assignment to Sobject
d) List has too many rows for assignment to Sobject
66.Which of the following clause is used in SOQL query to specify the maximum no of rows to return?
a) order by
67.Which triggers are involved when two conflicts are merged?
a) only delete & update contact triggers
b) only delete & update contact triggers on the
c) no triggers
d) delete & updates contact triggers and triggers
68.What would be the value of old context variable when 3 records are in selected in an object
b) new values
c) current values
d) old values
69.Which clause will be used in SOSL statement to restrict search in specific objects
d) order by
70.In a data model of an application. Job application than and review objects has master-detail relationship where job application is parent of review. What will be the relationships for parent-to-child relationship?
d) Job _application_k
71.What should be the minimum code coverage % before displaying an apex code?
72.A developer wrote an Apex code with SOQL embedded as given below. The Accounts manager position as given below. The accounts manager position does not exist in database. What type of exception will be the own?
Position__C position = (select Status_C, Approval_Status_c From position__c Where department_C= ‘Account Manager’);
a) Dual Exception
b) Query Exception
c) Null Pinter Exception
d) Index Exception
73.In which salesforce instances would be identical record IDs? Choose most appropriate.
a) production; full sandbox
b) production, full sandbox , apex sandbox
c) production; full sandbox,confg only sandbox, apex sandbox
d) salesforce.com never repeats record Ids
74.Refer the given code & select the correct option for checking whether the set has an element on not?
Set myset = new set (); Myset.add(1)Myset.add(3)
a) myset.t (1)
75.Identify the correct trigger context varaiable which shows the currently executing code is apex trigger
a) is Insent
b) is Executing
c) is After
d) is Delete