function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manish Anand 10Manish Anand 10 

Need answer for multiple choice questions.

1)The Review_c object have a lookup relationship to the job_Application_c object.The job_Application_c object has a master detail relationship up to the
 position_c object.The relationship is based on the auto populated defaults? 
 What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?
 
 A.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_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 through me Job_Applicacion_c inject.
 D.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.


2)A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce. 
  Which kind of relationship would a developer use to relate the Account to Warehouse?
 
  A. Lookup
  B. One to Many
  C. Master-Detail
  d. Parent-Child


3)A developer wants to create a custom object to track Customer Invoices. 
  How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account?

A. The Invoice should have a Master-Detail relationship to the Account
B. The Account should have a Master-Detail relationship to the Invoice.

4)What should a developer working in a sandbox use to exercise a new test class before the developer deploys that test class to production? Choose 2 answers
  
 A.The REST API and ApexTestRun method
 B.The Run Tests page in Salesforce Setup
 C.The Apex Test Execution page in Salesforce Setup
 D.The Test menu in the Developer Console
 
Best Answer chosen by Manish Anand 10
Mehul MakwanaMehul Makwana
Hi Anand,

Here are the Answers..

1)  A.Create a master-detail relationship in the Application custom object to the Job Postings custom object.(Your right here)
2)  A. Create a master-detail relationship to represent the one-to-many model of engines to parts.(we use Junction object when we need to create one to one relationship)

3) A.By using Maps to hold data from query results
    B.By performing DML transactions on lists of sObjects

4)  A.Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues() 
     D.Use SOQL to query Case records in the org to get all values for the Status picklist field. (We cant use getDescribe call in record type)

If this help you, Mark it as Best Answer

All Answers

Mehul MakwanaMehul Makwana
Hi Manish Anand,

I got this questions in developer certification exam and as per my study answers for above question is,

1)  A.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
2)  A. Lookup
3)  A. The Invoice should have a Master-Detail relationship to the Account (Because Account is standard object and it always need to be Master)

4)  C.The Apex Test Execution page in Salesforce Setup
     D.The Test menu in the Developer Console


Let me know if it helps you.
Manish Anand 10Manish Anand 10
Thanks Buddy.
 
Manish Anand 10Manish Anand 10
I have few more-

1)A candidate may apply to multiple jobs at the company Universal Containers by submtting a single application per job posting. 
Once an application is submitted for a job posting, that application cannot be modified to be resubmitted to a different job posting.
What can the administrator do to associate an application with each job posting in the schema for the organization?

  A.Create a master-detail relationship in the Application custom object to the Job Postings custom object.
  B.Create a master-detail relationship in the Job Postings custom object to the Applications custom object.
  C.Create a lookup relationship on both objects to a junction object called Job Posting Applications.
  D.Create a lookup relationship in the Applications custom object to the Job Postings custom object

  Looks like A.


2)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 master-detail relationship to represent the one-to-many model of engines to parts
  B. Create a junction object to relate many engines to many parts through a master-detail relationship
  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

 Looks like A. However, answer given is B.Not sure, what I am missing.

3)How can a developer avoid exceeding governor limits when using an Apex Trigger?
  A.By using Maps to hold data from query results
  B.By performing DML transactions on lists of sObjects
  C.By using a helper class that can be invoked from multiple triggers
  D.By using the Database class to handle DML Transactions
  
Answer seems to be- A,B (Wanted to confirm)

4)A developer wants to display all 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 SOQL to query Case records in the org to get all the RecordType values available for Case
   C.Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos()
   D.Use SOQL to query Case records in the org to get all values for the Status picklist field
Mehul MakwanaMehul Makwana
Hi Anand,

Here are the Answers..

1)  A.Create a master-detail relationship in the Application custom object to the Job Postings custom object.(Your right here)
2)  A. Create a master-detail relationship to represent the one-to-many model of engines to parts.(we use Junction object when we need to create one to one relationship)

3) A.By using Maps to hold data from query results
    B.By performing DML transactions on lists of sObjects

4)  A.Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues() 
     D.Use SOQL to query Case records in the org to get all values for the Status picklist field. (We cant use getDescribe call in record type)

If this help you, Mark it as Best Answer
This was selected as the best answer
Ziting FanZiting Fan
Can I ask where you get these execise questions, since I can not find the lastest.
Lucas CalegariLucas Calegari
2)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 master-detail relationship to represent the one-to-many model of engines to parts
  B. Create a junction object to relate many engines to many parts through a master-detail relationship
  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


The right answer here, is B.
The right pattern for junction object, is to create a master-detail relationship between the objects.
sri harika vemulapallisri harika vemulapalli
FLOGUY89UIGJK,DDOJOFF.,JOBIFJLKOPD.KFDOKMVVDI.'KPIDIK0-']KOD9IDIKDVOD<apex:page controller="Accountdetonnameandphn">
   <apex:form>
       <apex:pageblock id="out">
       <apex:pageMessages>
    </apex:pageMessages>
                   <apex:pageBlockSection>
            <apex:inputField value="{!ac.name}"/>
           <apex:inputField value="{!ac.phone}"/>
           
           </apex:pageBlockSection>
       
       <apex:pageBlockTable value="{!acc}" var ="v">
           <apex:column value="{!v.name}"/>
           </apex:pageBlockTable>
       <div align="center">
           <apex:actionStatus id="status" startText="please wait fetching records">
           
           <apex:facet name="start">
               
               </apex:facet>
               <apex:facet name="stop">
               <apex:commandButton value="Get accounts" action="{!sav}" status="status" reRender="out"/>

               </apex:facet>
           </apex:actionStatus>
           </div>
       </apex:pageblock>
   </apex:form>
</apex:page>