Ad Code

Salesforce platform developer 1 certification practice questions - set 1

Salesforce platform developer 1 certification practice questions

Salesforce platform developer 1 certification practice questions - set 1

1. Which approach should a developer use to add pagination to the visualforce page?

 a. StandardSetController
 b. The Extension attribute for a page
 c. A standard controller
 d. The action attribute for a page


2. A developer executes the following query in Apex to retrieve a list of contacts for each account: List<Account> accounts = [Select ID,Name [select ID,name from contacts] from account]
Which two executes may occur when it executes? Choose two answers

a. SOQL query row limit exception due to the number of contacts.
b. SOQL query row limit exception due to the number of accounts.
c. CPU limit execution due to the complexity of the query.
d. SOQL query limit exception due to the number of queries.


3. Which two platform features allow for the use of unsupported languages? Choose 2 answers

a. Heroku Acm.
b. Docker.
c. App.json.
d. Buildpacks.


4. A developer created a lightning component to display a short text summary for an object and wants to use it with multiple Apex classes. How should the developer design the Apex Cases?

a. Have each class method getObject() that returns the sObject that is controlled by the Apex classes.
b. Have each class implement an interface that defines method getTextSummary() that returns the summary.
c. Have each class define method getTestSummary that returns the summary.
d. Extend each class from the same base class that has a method getTextSummary() that returns the summary.


5. What are the eight officially supported languages on Heroku platform?

a. Node,Ruby,java,PHP,Python,.Net,C++.
b. C#,C++,Node,Ruby,Java,PHP,Go,.Net.
c. Lisp,PHP,Node,Ruby,Scala,Haskell,Go,Erlang.
d. Node,Ruby java,PHP,Python,Go,Scala,Clojure


6. What is the benefit of using an after-insert trigger over using a before insert trigger?

a. An after insert trigger allows a developer to make a callout to external service .
b. An after insert trigger allows a developer to modify fields in the new record without a Quote.
c. An after insert trigger allows a developer to insert other objects that reference the new record.
d. An after insert trigger allows a developer to bypass validation rules when updating fields.


7. What are the two benefits of lightning components framework? Choose 2 answers

a. It simplifies complexity when building pages, but not applications.
b. It promotes faster development using out of the box components that a suitable for desktop and mobile devices.
c. It provides an event-driven architecture for better decoupling between components.
d. It allows faster PDF generation with the lightning component.


8. A developer needs to display all the available fields for an object. In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? Choose 2 answers

a. Use Schema describe SObjects (new String[]{myObject}[0].fields.getmap() to return a map fields.
b. Use getGlobalDescribe().get{myObject}.getDescribe().fields.getMap() to return a map of fields.
c. Use SObject Type.myObject.fields.getMap() to return a map of fields.
d. Use myObject.s.ObjectType.getDescribe().fieldSet() to return a set of fields.


9. Which three options can be accomplished with formula fields? Choose 3 answers

a. Display the previous value for a field using PRIORVALUE function.
b. Generate a link using the HYPERLINK function to specific record.
c. Determine if a datetime field value has passed using the NOW function.
d. Return and display a field value from another object using VLOOKUP function.
e. Determine which of three different images to display using the IF function.


10. Which three declarative fields are correctly mapped to variable types in Apex? Choose 3 answers

a. Number maps to Decimal.
b. TextArea maps to list of types String.
c. Number maps to Integer.
d. Checkbox maps to Boolean.
e. Date/Time maps to Datetime.


11. Which set roll-up types are available when creating a roll-up summary field?

 a. AVERAGE, SUM, MIN, MAX.
 b. COUNT, SUM, MIN, MAX.
 c. SUM, MIN, MAX.
 d. AVERAGE, COUNT, SUM, MIN, MAX.


12. An org has a single account named ‘NoContacts’ that has no related contacts. Given the query:
List<Account> accounts = [Select ID, {Select ID, Name from contacts} from Account where Name = ‘Nocontacts’};
What is the result of running this Apex?

a. A QueryException is thrown.
b. Accounts[0].contacts is invalid Apex.
c. Account [0] is Null.
d. Accounts [0].contacts is an empty list.


13. How should a developer avoid hitting the governor limits in test methods?

a. Use Test.loadData() to load data from a static resource.
b. Use @ Testvisible on methods that create records.
c. Use Test.startTest() to reset governor limits.
d. Use @Is Test (SeeAllData = true) to use existing data.


14. What is the correct invocation to push code to the app sushi-prod from the command line?

a. Git push master.
b. Heroku push – app sushi-prod.
c. Git push Heroku master -app sushi-prod.
d. Heroku git push master.


15. A developer encounters APEX heap limit errors in a trigger. Which two methods should the developer use to avoid this error?
Choose 2 answers

a. Remove or set collections to null after use.
b. Query and store fields from the related object in a collection when updating related objects.
c. Use the transient keyword when declaring variables.
d. Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection.



You may also like




Post a Comment

0 Comments