1) How to Reset the user password through Developer Console? Please select the appropriate syntax. A) Go to Developer Console. In Developer Console, Click Debug – Open Execute Anonymous Window. In Anonymous window you can use the following code to reset password. */ * SYNTAX * system.setPassword('', 'Actual_Password_To_Be_Set'); */ system.setPassword('005xx0000000XXX', 'New_Password_645'); B) Go to Developer Console. In Developer Console, Click Debug – Open Execute Anonymous Window. In Anonymous window you can use the following code to reset password. */ * SYNTAX* system.setPassword('', ‘Old_Password’,'Actual_Password_To_Be_Set',);*/system.setPassword('005xx0000000XXX', ‘oldpassword’, 'New_Password_645');C) Go to Developer Console.In Developer Console, Click Debug – Open Execute Anonymous Window.In Anonymous window you can use the following code to reset password.*/* SYNTAX* system.setPassword('', 'Actual_Password_To_Be_Set');*/system.setPassword(‘00D5i00000ABCED’, 'New_Password_645');D) None of the AboveCorrect Answer : A 2) The following example creates an sObject of type Account with the name Acme and assigns it to the acct variable. A) Account acct = new Account(Name='Acme'); B) Account a = new Account (); a.Name = Acc1;C) Account a = new Account();D) Both A & BE) None of the aboveCorrect Answer : D 3) Variables that are declared with the generic sObject data type can reference any Salesforce record, whether it is a standard or custom object record. TrueFalseCorrect Answer : True 4) Choose the correct one below Option 1 : A custom object with a label of Customer has an API name of Customer__c. Option 2 : A custom field with a label of Description has an API name of Description__c. Option 3 : A custom relationship field with a label of Items has an API name of Items__r. A) Option 1B) Option 2C) Option 1, Option 2, Option 3D) Option 3Correct Answer : C 5) Which below DML statement can be used to combine or join three records of the same sObject type into one of the records, deleting the others, and re-parenting any related record A) UpsertB) UpdateC) Database ClassD) MergeE) None of the aboveCorrect Answer : D 6) What would be the output for this below code?Set<Integer>SemMarks=new Set<Integer>{10,20,30,40,50}; Boolean b2=SemMarks.Isempty(); System.debug('No It is not empty ' +b2); A) No It is not empty falseB) It is empty falseC) No It is not empty trueD) It is empty trueE) Throws ErrorCorrect Answer : A 7) Instead of using the equal operator (=) for comparison, you can perform fuzzy matches by using below operator. A) LikeB) =:C) IND) BetweenE) All of the aboveCorrect Answer : A 8) This is a special data type in Salesforce. It is similar to a table in SQL and contains fields which are similar to columns in SQL. A) EnumB) sObjectC) BlobD) ListE) MapCorrect Answer : B 9) Which method from Database class can be used to delete the records from Recycle bin? Example: List MyList = [SELECT Id,Name From Account Where Industry='Media']; DELETE MyList; A) DataBase.emptyRecycleBin(MyList);B) DataBase.emptyRecycleBin();C) Database.undelete()D) Database.delete()E) Database.emptyRecycleBin(List ids)Correct Answer : A 10) Upsert uses the sObject record's to determine whether it should create a new record or update an existing one A) primary key (the ID)B) an idLookup fieldC) external ID fieldD) All of the aboveCorrect Answer : C 11) Each DML statement accepts either a single sObject or a list (or array) of sObjects. A) TrueB) FalseCorrect Answer : A 12)What would be the output for below program? Map<String,String>chemicals =new Map<String,String>{'1000'=>'HCL','1002'=>'H2SO4','1003'=>'NH3'};Set<String>setofkeys=new Set<String>(); setofkeys=chemicals.keySet(); System.debug('Values of set with Keys ' +setofkeys); A) Values of set with Keys {1000, 1002, 1003}B) Values of set with Keys {HCL, H2SO4, NH3}C) Values of set with Keys {1000,HCL; 1002,H2SO4; 1003,NH3}D) Values of set with Keys {‘1000,HCL’; ‘1002,H2SO4’; ‘1003,NH3’}E) Through ErrorCorrect Answer : A 13) Choose the correct ones for External Id’s 1) An object can have at most 7 External IDs’ fields. 2) External IDs are indexed; meaning queries against them will run a bit faster. 3) External IDs are not indexed and thus non searchable 4) It is a user-defined cross-referenced field. A) 1,2 & 3 B) 1,2 & 4 C) 1,2,3,4D) 2,3,4Correct Answer : B 14) 14)Given the code block: Integer x; for(x=0; x<10; x+=2){ if(x==8) break; if(x==10) break; } System.debug(x); Which value will the system.debug statement display? A) 4B) 10C) 2D) 8Correct Answer : D 15) What is the data type returned by the following SOSL search? [FIND ‘Acme’ IN Name Fields Returning Account, Opportunity]; A) List<List<Account>, List<Opportunity>>B) Map<sObject, sObject>C) List<List><sObject>>D) Map<id, sObject>E) None of the aboveCorrect Answer : C 16) SOQL statements in Apex can reference Apex code variables and expressions if they are preceded by a colon (:) The use of a local variable within a SOQL statement is called A) BindB) System.assertsC) Find {:}D) (AND, OR)E) None of the aboveCorrect Answer : A 17) When should You Use DML Statements or Database Methods?1) Use DML statements if you want any error that occurs during bulk DML processing to be thrown as an Apex exception that immediately interrupts control flow (by using try. . .catch blocks). 2) Use Database class methods if you want to allow partial success of a bulk DML operation—if a record fails, the remainder of the DML operation can still succeed. 3) All DML operations in a transaction either complete successfully, or if an error occurs in one operation, the entire transaction is rolled back and no data is committed to the database. 4) When using Database class, you cannot write code that never throws DML exception errors. A) 1 & 2B) 1 & 3C) 1 & 2 & 3D) 2 & 4Correct Answer : C 18) Which below statements are TRUE? A) Use DML statements if you want any error that occurs during bulk DML processing to be thrown as an Apex exceptionB) Use Database class methods if you want to allow partial success of a bulk DML operationC) In Database class if a record fails, the remainder of the DML operation can still succeedD) A & BE) All three statements A,B and C are correctCorrect Answer : E 19) Which clause that can be used in a SELECT statement of a SOQL query when you’re querying data that contains polymorphic relationships. A) Having ClauseB) TypeOfC) Group ByD) Order ByE) NoneCorrect Answer : B 20) Methods with the future annotation must be static methods, and can only return a void type. A) TrueB) FalseCorrect Answer : E 21)The System.schedule() method of schedulable Asynchronous Apex takes how many arguments? Option 1) A name for the job Option 2) A CRON expression used to represent the time and date the job is scheduled to run, Option 3) An instance of a class that implements the Schedulable interface. A) 1, 2B) 2, 3C) 3, 2D) 1, 2, 3Correct Answer : D 22) Which trigger event only works with recovered records—that is, records that were deleted and then recovered from the Recycle Bin through the undelete DML statement. A) after insertB) after deleteC) after undeleteD) before updateE) None of the aboveCorrect Answer : C 23) Which exception below code return? List str; str.add(‘salesforce’); A) Illegal assignment from List to StringB) DmlExceptionC) ListExceptionD) NoExceptionCorrect Answer : A 24) Select appropriate Governor limits in Salesforce A) Per-Transaction Apex LimitsB) Size-Specific Apex LimitsC) Miscellaneous Apex LimitsD) Email LimitsE) Push Notification LimitsF) All of the AboveCorrect Answer : F 25) Below are the reasons to cause 1) The developer is trying to dereference a null object. 2) The developer is performing some DML and it fails. 3) The developer is assigning a list of records to a singleton object. A) Exception HandlingB) Apex HandlerC) Governor LimitsD) Apex DebugingE) None of the aboveCorrect Answer : A 26) In below list or set iteration for loops do not need the size or length of the collection to run? A) for (initialization; Boolean_exit_condition; increment) {…….};B) for (variable : list_or_set) {…….};C) for (variable : [inline_soql_query]) {…….};D) All of the AboveCorrect Answer : B 27) I have a scenario where I need to Retrieve 50,000,000 of SOQL queries but normal Apex can retrieve 50,000 SOQL queries. What process or which apex I need to use to retrieve 50,000,000 queries? A) BatchableB) QueueableC) @futureD) SchedulableE) None of the AboveCorrect Answer : A 28) The below code defines an Account list with no elements. List accts = new Account[]{}; A) TrueB) FalseCorrect Answer : A 29) What happens to the below code is executed String change = [SELECT Name FROM Account [0].Name.toLowerCase(); Correct Answer : A name that has been shifted to lower case is returned. The SOQL statement returns a list of which the first element (at index 0) is accessed through [0]. Next, the Name field is accessed and converted to lowercase with this expression .Name.toLowerCase() 30) Calling addError()in a trigger causes the entire set of operations to roll back, except when bulk DML is called with partial success. A) @future(callout=true)B) addError()C) clear()D) get(fieldName)E) clone()Correct Answer : B 31) In which Asynchronous Apex but provide additional job chaining and allow more complex data types to be used A) future methodB) Batch ApexC) Queueable ApexD) Scheduled ApexCorrect Answer : C 32) What happens when below code gets executed in Anonymous window. There is no record called ‘Apex’Account m=[SELECT NAME from Account where NAME='Apex' LIMIT 1]; System.debug(m); A) Simply executesB) Throw an exception called ‘System.QueryException: ‘C) Throw an exception ‘System.sObject Exception:’D) Retreivies Apex recordE) None of the aboveCorrect Answer : B 33) Which block always executes regardless of what exception is thrown, and even if no exception is thrown in Apex A) catchB) finallyC) TryD) ThrowsCorrect Answer : B 34) What is not counted for Apex CPU Time Limit? Option A) Database operations like database operation for DML, SOQL and SOSL. Option B) Execution of Visualforce Pages Option C) Wait time for Apex Callout Option D) Aggregate SOQL Option E) If you perform more then 150 DML statements in one execution. A) Option A, B, CB) Option A, B, DC) Option A, B, C, DD) Option A, C, DCorrect Answer : D 35) In which type of exceptions enable you to specify detailed error messages and have more custom error handling in your catch blocks. A) List ExceptionB) NullPointer ExceptionC) sObject ExceptionD) Custom ExceptionCorrect Answer : D 36) Which annotation can be used to improve runtime performance by caching method results on the client A) @AuraEnabled(cacheable=true)B) @AuraEnabledC) @InvocableMethodD) @SuppressWarningsCorrect Answer : A 37) If you execute DML operations within an anonymous block, they execute using the current user’s object and field-level permissions A) TrueB) FalseCorrect Answer : A 38) In Apex you can insert records related to existing records if a relationship has already been defined between the two objects, identify the relationships A) Lookup & Master-detail relationshipB) SelfC) HierarchicalD) ExternalCorrect Answer : A 39) Select which are correct for Batch Apex? 1) Using Batch apex, we can perform the DML operations on the bulk records at a time 2) Batch Apex allows us to process max. of 50 million records. 3) To implement the batch process, we need not use an interface called as Database.Batchable 4) All Batch Apex classes should be defined with the Access specifier "Global". Select appropriate answer A) 1,2,4B) 1,3C) 2,3D) None of the aboveCorrect Answer : A 40) What is the purpose of @TestVisible? A) We can include @TestVisible so that even though variable is private we can access from the test classB) We can include @TestVisible so that even though variable is private we cannot access from the test classC) We can include @TestVisible so that even though variable is private we can access from the another classD) ExternalWe can include @TestVisible so that even though variable is private we can access from the another classCorrect Answer : A 41) Use the Approval.process method to submit an approval request and approve or reject existing approval requests A) TrueB) FalseCorrect Answer : A 42) Which method to submit an approval request and approve or reject existing approval requests. A) Approval.ProcessSubmitRequest()B) Approval.process(approvalRequests)C) Approval.LockResult()D) Approval.unlock()E) None of the aboveCorrect Answer : B 43) In single email message class which methods can set up to 100 addresses & set the main body of the mail. Option 1: setBccAddresses(bccAddresses) Option 2: setCcAddresses(ccAddresses) Option 3: setToaddress() Option 4: setPlainTextBody() Option 5: setHtmlBody(htmlBody) A) 1,2,4B) 2,4,3C) 4,5D) 3,4E) None of the aboveCorrect Answer : D 44) How many numbers of jobs, a developer can queue using System.enqueueJob() at a time? Option-1) 50 jobs to the queue with System.enqueueJob in a single transaction in Synchronous apex. Option-2) In asynchronous transactions, you can add only one job to the queue. Option-3) 100 jobs to the queue with System.enqueueJob in a single transaction in Synchronous apex. Option-4) In asynchronous transactions, you can add only 5 job to the queue. A) Option-1 & 2B) Option-2 & 3C) Option-3 & 4D) Option-4 & 1Correct Answer : A 45) What is the process of Metadata API?Option 1) Metadata API is to move metadata between Salesforce orgs during the development process. Option 2) Metadata API does work directly with business data. Option 3) Using Metadata API, you can deploy, retrieve, create, update, or delete customization-related information such as page layouts and custom object definitions. Option 4) You can move metadata with one of two ways. The first method is with Metadata API deploy() and retrieve() calls. A) Option-1 & 2B) Option-1,2 & 3C) Option-2,3 & 4D) Option-1,3 & 4Correct Answer : D 46) Contact c=[SELECR id,FirstName,LastName,Email from Contact Where lastname='Ajay']; What does the query return if there is no contact with the last name Ajay? A) NullB) System.QueryException occurs with no records foundC) DML ExceptionD) Ajay record will return and store in databaseCorrect Answer : B 47) Check the below code ad choose the correct answerList<Account>acc=new<Account>List(); Account a1= new Account(Name='Demo 1'); Account a2= new Account(Name='Demo 2'); Account a3= new Account(Name='Demo 3'); acc.add(a1); acc.add(a2); acc.add(a3);Database.SaveResult[] srList = Database.insert(acc, true); What happens if I give boolean value as true or false as one of the parameter in Database.insert(acc, true) Option 1) In the above program when we give Database.insert(acc, true), if any errors occurs in any of the records a1,a2,a3 the entire operation of insert is rollbacked.Option 2) In the above program when we give Database.insert(acc, false), if any errors occurs in any of the records a1,a2,a3 only that record is terminated and the status us saved to SaveResult class and rest of the operations are processed normally.Option 3) Throws an ExceptionOption 4) Simply records will get inserted A) Option-1 & 2 are correctB) Option-1,2 & 3 are correctC) Option-3 & 4 are correctD) Option- 4 & 1 are correctCorrect Answer : A 48) Which clause in a SOQL query to add subtotals for all combinations of a grouped field in the query results. This action is useful for compiling cross-tabular reports of data A) GROUP BY ROLLUPB) GROUP BY CUBEC) [GROUP BY fieldGroupByList]D) Having clauseCorrect Answer : B 49) Identify which options does External objects don’t support below SOSL operators. A) INCLUDES operatorB) LIKE operatorC) EXCLUDES operatorD) toLabel() functionE) A,B,CF) All off the aboveCorrect Answer : D 50) Identity the appropriate answer Can we call callouts from the Triggers?Option A) We cannot call the callouts directly from Triggers. Option B) Instead we will define callouts in the future annotated methods and this future annotated method can be called from the Triggers. Option C) Can we call 10 callouts in a single transaction. A) Option A is only correctB) Option B is only correctC) Option C is only correctD) Option A, Option B, Option C are correct.Correct Answer : D