Development related questions - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Nada IsmaelNada Ismael 

Development related questions

Hi, I have some questions related to development, and I need to know what are the correct answers, also I need to understand why they are correct.


1) What must the Controller for a visualforce page utilize to override the standard Opportunity view button?
a. The StandardSetController to support related lists for pagination.
b. The Opportunity StandardController for pre-built functionality.
c. A callback constructor to reference the StandardController.  (is the answer is C or B, and what is the callback constructor?)
d. A constructor that initializes a private Opportunity variable.


2) Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
a. Create activities at multiple intervals.
b. Send an outbound message without Apex code.
c. Copy an account address to its contacts. (are the answers are A and B, or B and C; I think it's A and B because I can create Tasks, events, and calendar by creating a new record via process builder but I can't create a new record via workflow rule?)
d. Submit a contract for approval.



3) A developer creates a new Visualforce page and Apex extension and writes test classes that exercise 95% coverage of the new Apex extension. Changeset deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required." What can the developer do to successfully deploy the new Visualforce page and extension?
a.
Create test classes to exercise the Visualforce page markup.
b. Select "Disable Parallel Apex Testing" to run all the tests.
c. Add test methods to existing test classes from previous deployments.
d. Select "Fast Deployment" to bypass running all the tests. (is the answer is C or D? )


4) A developer is creating an application to track engines and their parts an individual part can be used in different types of engines. What data model should be used to track the data and to prevent orphan records?
a. Create a junction object to relate many engines to many parts through a master-detail relationship. (why it's A not B?)
b. Create a master-detail relationship to represent the one-to-many model of engines to parts
C. Create a lookup relationship to represent how each part relates to the parent engine object.
D. create a junction object to relate many engines to many parts through a lookup relationship.
 

5) A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case. Status field. The Case object and the Case Status field are on a custom visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? Choose 2 answers
a. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
B. Use Schema.RecordTypelnfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
C. Use SOQL to query Case records in the org to get all the RecordType values available for Case. (why it's A and C, not A and B?)
d. Use SOQL to query Case records in the org to get all value for the Status pickiest field.


6) The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-detail relationship up to the Position_ object. The relationship field names are based on the auto-populated defaults what is the recommended way to display field data from the related Review_c records on a Visualforce for a single Position_c record?
a. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.
b. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data.
c. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review c data through the Job_Application_c object.
d. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data. (I don't understand why this is the correct answer)


7) Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?
a. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object
b. The Lookup Relationship cannot be marked as required on the page layout for the Custom Object.
c. The Custom Object will be deleted when the referenced Standard Object is deleted. (is it A or C?)
d. The Custom Object inherits security from the referenced Standard Object.


8) Which scenario is invalid for execution by unit Tests?
a. Executing test scenarios for negative test scenarios.
b. Loading test data on Mace of user input for Flows.
c. Loading the standard Pricebook ID using a system method (is it B or C, I think we can load the price-book using Test.getStandardPricebookID(); ?)


9) In the Lightning component Framework, Which resource can be used to fire events?  Choose 2 events
a. Visualforce Controller Actions.
b. Third-Party web service code
c. Third-Party JavaScript Code.
d. JavaScript controller Actions. (why these the correct answers, not A?)
lalit aroralalit arora
1) What must the Controller for a visualforce page utilize to override the standard Opportunity view button?
a. The StandardSetController to support related lists for pagination.
b. The Opportunity StandardController for pre-built functionality.
c. A callback constructor to reference the StandardController.  (is the answer is C or B, and what is the callback constructor?)
d. A constructor that initializes a private Opportunity variable.

Comments: The answer to this is B. If you would like to override a button, there is a process that you have to follow. Also we don't have callback thing in Apex.

Here is the reference for you

https://www.salesforcetutorial.com/overriding-standard-new-button-vf-page/

2) Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
a. Create activities at multiple intervals.
b. Send an outbound message without Apex code.
c. Copy an account address to its contacts. (are the answers are A and B, or B and C; I think it's A and B because I can create Tasks, events, and calendar by creating a new record via process builder but I can't create a new record via workflow rule?)
d. Submit a contract for approval.

Comments : Correct its A and B, We have don't C and D feature available with Workflow

3) A developer creates a new Visualforce page and Apex extension and writes test classes that exercise 95% coverage of the new Apex extension. Changeset deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required." What can the developer do to successfully deploy the new Visualforce page and extension?
a. Create test classes to exercise the Visualforce page markup.
b. Select "Disable Parallel Apex Testing" to run all the tests.
c. Add test methods to existing test classes from previous deployments.
d. Select "Fast Deployment" to bypass running all the tests. (is the answer is C or D? )

Comments:
Deployment Resulting in Overall Coverage Lower Than 75%
When deploying new components that have 100% coverage to production, the deployment fails if the average coverage between the new and existing code doesn’t meet the 75% threshold. If a test run in the destination organization returns a coverage result of less than 75%, modify the existing test methods or write additional test methods to raise the code coverage over 75%. Deploy the modified or new test methods separately or with your new code that has 100% coverage.

4) A developer is creating an application to track engines and their parts an individual part can be used in different types of engines. What data model should be used to track the data and to prevent orphan records?
a. Create a junction object to relate many engines to many parts through a master-detail relationship. (why it's A not B?)
b. Create a master-detail relationship to represent the one-to-many model of engines to parts
C. Create a lookup relationship to represent how each part relates to the parent engine object.
D. create a junction object to relate many engines to many parts through a lookup relationship.
 
 Comments: A because of this "an individual part can be used in different types of engines"

5) A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case. Status field. The Case object and the Case Status field are on a custom visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? Choose 2 answers
a. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
B. Use Schema.RecordTypelnfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
C. Use SOQL to query Case records in the org to get all the RecordType values available for Case. (why it's A and C, not A and B?)
d. Use SOQL to query Case records in the org to get all value for the Status pickiest field.

Comments : Here is the reason

https://developer.salesforce.com/forums/?id=9060G000000XcHGQA0


6) The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-detail relationship up to the Position_ object. The relationship field names are based on the auto-populated defaults what is the recommended way to display field data from the related Review_c records on a Visualforce for a single Position_c record?
a. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.
b. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data.
c. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review c data through the Job_Application_c object.
d. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data. (I don't understand why this is the correct answer)

Comments: Should be B. That's all we require for this.

7) Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?
a. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object
b. The Lookup Relationship cannot be marked as required on the page layout for the Custom Object.
c. The Custom Object will be deleted when the referenced Standard Object is deleted. (is it A or C?)
d. The Custom Object inherits security from the referenced Standard Object.

Comments: B. We don't have any such restriction.


8) Which scenario is invalid for execution by unit Tests?
a. Executing test scenarios for negative test scenarios.
b. Loading test data on Mace of user input for Flows.
c. Loading the standard Pricebook ID using a system method (is it B or C, I think we can load the price-book using Test.getStandardPricebookID(); ?)

Comments: Should be B, we don't have this supported with Unit tests in apex

9) In the Lightning component Framework, Which resource can be used to fire events?  Choose 2 events
a. Visualforce Controller Actions.
b. Third-Party web service code
c. Third-Party JavaScript Code.
d. JavaScript controller Actions. (why these the correct answers, not A?)

Comments: Should be A and D both! we need to choose 2 here

Apologies, if any answers marked wrong in hurry.

Regards,
Lalit
Nada IsmaelNada Ismael

Thanks a lot, Lalit!

I have understood al your comments, but I only have one question about question #4

4) A developer is creating an application to track engines and their parts an individual part can be used in different types of engines. What data model should be used to track the data and to prevent orphan records?
a. Create a junction object to relate many engines to many parts through a master-detail relationship. (why it's A not B?)
b. Create a master-detail relationship to represent the one-to-many model of engines to parts
C. Create a lookup relationship to represent how each part relates to the parent engine object.
D. create a junction object to relate many engines to many parts through a lookup relationship.
 
 Comments: A because of this "an individual part can be used in different types of engines"

as I understand from "an individual part can be used in different types of engines" that the relation is one-to-many, why we considered it as many-to-many?