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?
TRUE
FALSE
ANS: TRUE
53.Identify the invalid trigger event from the following
a. Before undelete
b. After insert
c. Before update
d. After delete
ANS: A
54.In Apex, all variables and expressions have a data type?
A. Old
B. oldMap
C. new
D. newMap
ANS: C
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
used
D. The error will not be displayed as the Apex Errors are only recorded in the debug log
ANS: C
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
ANS: B,C,D,E
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
ANS: B
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
Name=’Accounts Manager’];
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
ANS: C
59.Identify the correct trigger context variable which shows the currently executing code is Apex
trigger. Choose most appropre option:
A- isinsert
B- isExecuting
C- isAfter
D- isDelete
ANS: B
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
ANS: C
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.
ANS: A
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
D. DmlException
ANS: D
63.In Developer Edition how much storage space we get when we sign-up for org?
A. 5MB
B. 10MB
C. 15MB
D. 20MB
ANS: A
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
ANS: C
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=
‘IT’)
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
ANS: A
66.Which of the following clause is used in SOQL query to specify the maximum no of rows to return?
a) order by
b) where
c)group by
d) limit
ANS: D
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
ANS: A
68.What would be the value of old context variable when 3 records are in selected in an object
a) null
b) new values
c) current values
d) old values
ANS: A
69.Which clause will be used in SOSL statement to restrict search in specific objects
a) limit
b) returning
c) using
d) order by
ANS: B
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?
a) Review__c
b) Review__k
c) Job_application_c
d) Job _application_k
ANS: B
71.What should be the minimum code coverage % before displaying an apex code?
a) 71
b) 73
c) 75
d) 72
ANS: C
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
ANS: B
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
ANS: A
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)
System.assert(……….);
a) myset.t (1)
b) myset.index(1)
c) myset.contains(1)
d) myset.present(1)
ANS: C
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
ANS: B
[…] « Previous Next » […]
[…] « Previous […]