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
Reshmi SmijuReshmi Smiju 

Need help on some questions

Hi,
I am preparing for Developer 1 exam. As I am confused with below questions, it would be much helpful to find out the correct answer for them. My Answers are menioned in the brackets.

1.  Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers.
             A.Create activities at multiple intervals.   (ANS)
             B. Send an outbound message without Apex code. (ANS)
            C. Copy an account address to its contacts.
            D. Submit a contract for approval.

2.  How can a developer refer to, or instantiate, a PageReference in Apex? Choose 2 answers
           A. By using a PageReference with a partial or full URL. (ANS)
           B. By using the Page object and a Visualforce page name. (ANS)
           C. By using the ApexPages.Page() method with a Visualforce page name.  
           D. By using the PageReference.Page() method with a partial or full URL.

3.  A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user Inputs across multiple Visualforce pages and from a parameter on the initial URL. Which statement is unnecessary inside the unit test for the custom controller?
            A. public ExtendedController(ApexPages.StandardController cntri) { }  
            B. ApexPages.currentPage().getParameters() put('input', 'TestValue);
            C. Test.setCurrentPage(pageRef);
            D. String nextPage = controller.save().getUrl(); (ANS)

4. 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(). (ANS)
           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.  (ANS)
           D. Use SOQL to query Case records In the org to get all value for the Status pickiest field.

5. An sObject named Application _c has a lookup relationship to another sObject named Position_c. Both Application _c and Position c have a picklist field named Status_c. When the Status c field on Position __c is updated, the Status_c field on Application _c needs to be populated automatically with the same value, and execute a workflow rule on Application c. Flow can a developer accomplish this?

      A. By changing Application c.Status_c into a roll-up summary field.
      B. By changing Application c.Status_c into a formula field.  (ANS)
      C. By using an Apex trigger with a DML operation.
       D. By configuring a cross-object field update with a workflow.

6. )   Which type of code represents the Controller in MVC architecture on the Force.com platform? Choose 2 answers

        A.JavaScript that is used to make a menu item display itself.
        B. StandardController system methods that are referenced by Visualforce.(ANS)
        C. Custom Apex and JavaScript code that is used to manipulate data. (ANS)
        D. A static resource that contains CSS and images.

7. A developer needs to provide a Visualforce page that lets users enter Product-specific details during a Sales cycle. How can this be accomplished? Choose 2 answers

            A. Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify.
            B. Create a new Visualforce page and an Apex controller to provide Product data entry.  (ANS)
            C. Copy the standard page and then make a new Visualforce page for Product data entry.
            D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.  (ANS)

8.  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.   (ANS)

9.  On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?
             A. Use the constructor method for the controller.   (ANS)
             B. Use the $Action.View method in the Visualforce page.
             C. Create a new PageReference object with the Id.
             D. Use the <apex:detail> tag in the Visualforce page.

10. A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?
           A. By using ApexMessage.Message() to display an error message after the number of DML statements is excel
           B. By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded.
            C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
             D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded. (ANS)


Thanks Much for the help in Advance
Regards,
Reshmi
Best Answer chosen by Reshmi Smiju
VineetKumarVineetKumar
11) C, D, E
12) A, D
13) A : You cannot write logic in standard controller, you can just use the existing actions and functionalities
14) C
15) B, D

All Answers

VineetKumarVineetKumar
1) B, D : You can't create activities using workflow, only tasks can be created.
2) A, B
3) A, D
4) A, B : Use schema method to fetch such datas.
5) B
6) B, C
7) B, D
8) B
9) D
10) D
Reshmi SmijuReshmi Smiju
Thank you Vineet for the response. I have 5 more questions to ask. Pls help me on that too.

11.  Which declarative method helps ensure quality data? Choose 3 answers
        A. Exception handling
        B. Workflow alerts
        C. Validation rules  (ANS)
        D. Lookup filters      (ANS)
        E. Page layouts      (ANS)

12. Where can debug log filter settings be set Choose 2 answers?
            A.The Filters link by the monitored user's name within the web UI.    (ANS)
            B. The Show more link on the debug log's record.
            C. On the monitored user's name.
            D. The Log Filters tab on a class or trigger detail page.        (ANS)

13. A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic?
            A. In a Controller Extension.
            B. In a Custom Controller.
            C. In a Standard Controller.   (ANS)
            D. In a Standard Extension.

14   Which scenario is invalid for execution by unit Tests?
            A. Executing test scenarios for negative test scenarios.
            B. Executing methods as different uses
            C. Loading test data in place of user input for Flows.  (ANS)
            D. Loading the standard Pricebook ID using a system method

15.  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     (ANS)
                 C. Third-Party javascript Code.   
                 D.Javascript controller Actions.    (ANS)


Thank you much
Reshmi
VineetKumarVineetKumar
11) C, D, E
12) A, D
13) A : You cannot write logic in standard controller, you can just use the existing actions and functionalities
14) C
15) B, D
This was selected as the best answer
Reshmi SmijuReshmi Smiju
Thank you Vineet for the prompt response.
 
Sayanton Sadhu 12Sayanton Sadhu 12
what is the ans of 8 no question?
つよぽん くさなぎつよぽん くさなぎ
5) B is not correct?
If you change the stauts item to a formula field workflow is not started.
つよぽん くさなぎつよぽん くさなぎ
13)
Since the verified using the SOQL, is an extension to the controller instead of a standard controller?
15) C and D is I think that it is correct.
Using External JavaScript Libraries.
https://developer.salesforce.com/docs/atlas.en-us.202.0.lightning.meta/lightning/js_libs_platform.htm
kevindotcarkevindotcar
I think 5 is C because;
A - obviously wrong
B -  As つよぽん くさなぎ  says,   the workflow won't be triggered
D - cross-object field updates only work in Master Detail relaionships, AFAIK
 
つよぽん くさなぎつよぽん くさなぎ
I also Q.5 think C
nidhi dewangan 3nidhi dewangan 3
8th answer??
 
fifedog15fifedog15
kevindotcar - Your statement "D - cross-object field updates only work in Master Detail relaionships" is incorrect.  cross-object field updates work on lookup relationships as long as you're going from parent record down to child.    You can not use a workflow update to update parent records.  For that you'd have to use Process Builder. 
kevindotcarkevindotcar
Hi fifedog,

I was referencing this article;
https://help.salesforce.com/articleView?id=workflow_cross_object_field_updates.htm&language=en_US&type=0

Where it says;
Cross-object field updates are supported for all custom objects that are children of custom objects in a master-detail relationship.

...I personally can't find anything on Salesforce help about lookups and COF.  Which isn't to say it doesn't exist - I just can't find it.

It seems like the only workable choice in the given set of solutions is still C - as process builder is not a given choice.

Also, can you give a link to a reference for cross-object field updates work on lookup relationships?   Like I said, I can't seem to find that.
It's a popular idea on the Ideaexchange, but I see nothing that was implemented.


I agree Process Builder is a solution - it just wasn't offered. 
Thanks
 
Aleksandrs SavkinsAleksandrs Savkins
where did you find all these questions? 
KonstruktorKonstruktor

VineetKumar,
we can not submit for approval with workflow(https://help.salesforce.com/articleView?id=process_which_tool.htm&language=en_US&type=0)

answer for the question 1 is incorrect

KonstruktorKonstruktor

Acitivities include tasks, therefore correct answer for 1. is A and B

https://help.salesforce.com/articleView?id=activities.htm&language=en&type=0

fifedog15fifedog15
VineetKumar, You didn't read the question fully I think. It's saying why would you have to use workflow over process builder? You would have to use workflow over process builder because if you have a requirement to send an outbound message, process builder is unable to send outbound on messages
gidiemgidiem
Reshmi Smiju was correct on #9. There is no need to use coarse -grained output
<apex:detail />

in order to retrieve the record ID. Just use the
ApexPages.currentPage().getParameters().get('Id')

method on construction and with the Id query for the necessary fields from that record.
DuckyDucky
what about the question no.3?
I think the answer should be A, since the question mentioned the custom controller, but the answer A is mentioning the Constructor of ExtensionController?
Lucas CalegariLucas Calegari
Hi friends. Is question 14 answer letter C?
I saw some mocks where the answer is letter D.

Can someone explain why it should be C?
kevindotcarkevindotcar
Hi Lucas O
D.  is done pretty simply with a call like this;
Id pricebookId = Test.getStandardPricebookId();
Flows don't have a method of loading test data, other than input screens.
UNLESS... you have parts of your flow logic in an APEX class, in which case you COULD  load test data via a resource, like this;
List<sObject> ls = Test.loadData(Account.sObjectType, 'myResource');
But, the question did not mention a helper class for logic, so it's a little bit of a "trick question".
But, this is just my discussion on the topic.
Good luck on your test!
 
Lucas CalegariLucas Calegari
Hi Kevin!

Thank you very much for your answer and for clarify it for me!

Cheers,
Lucas!
SangHee ParkSangHee Park
for questino #1, the answer are A,B... since activity consists of task / events.. and you can create tasks with workflow at multiple intervals
Samir Sayyad 25Samir Sayyad 25

Hi Team,

I have one below question.

 

Pull any three objects, say A, B and C, in such a manner that A is related to B and B is related to C. When a field is updated on object A, an update should be executed on Object C automatically.

Awaiting for your reply.

Thanks.

Jacek BialeckiJacek Bialecki
In terms of 1):

1.  Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers.
             A.Create activities at multiple intervals.   (ANS)
             B. Send an outbound message without Apex code. (ANS)
            C. Copy an account address to its contacts.
            D. Submit a contract for approval.

My understanding is different... The question is about stuff you need to care/do WITHOUT using Workflow Rules. For some reason you decided or have to use Process Builder and you CANNOT use standard workflow. In this circumstances the answer is A, D.

B and C are not correct because you CAN do them with Workflow rules
Linda 98Linda 98
Hi jacek,

Question says...Which req needs to be implemented by using Workflow instead of builder.   from below given options,we are checking for reasons why we need to use WF than Builder.

We cannot submit for approval using workflow.  So D is wrong answer.
We can send outbound msg using WF but not builder.So he has to use WF ....B is correct
Copy an account address to its contacts is wrong answer as we cant update child records from WF.We can only update self record.
activvities include task which can be done with WF

So correct aswers are A and B


 
Umer YousafUmer Yousaf
Question # 9
I think its Option  ----> C. Create a new PageReference object with the Id.

Its Like this

        PageReference acctPage = new PageReference('/apex/ShowAccountRecord?id=0017F00000FSLwYQAX');
      
passing Parameter  (id=0017F00000FSLwYQAX) on Url (/apex/ShowAccountRecord) like question said.

Can someone verify this? 
Liliana CentraLiliana Centra
Hi, can you help me too please? I'm confused for this question:

1) When opportunity is CLosedWon, what would a developer do to mark the Account that is related to that opportunity as a customer?

A. Create an Opportunity validation rule to set the Account Type field to a Customer when an Opportunity is ClosedWon
B. Create an Account trigger to check for related CLosedWon Opportunities and set the Account Type field to Customer if found
C. Create a scheduled Apex Job to run nightily and set the Account Type field to Customer for all CLosedWon Opportunities
D. Create an Opportunity workflow rule to set the related Type field to Customer when the Opportunity is CLosedWon-->ANS?

2) What would a developer do to update a picklist field on related opportunity records when a modification to the associated account record is detected?

A. create a process with process builder-->ANS?
B. create a workflow rule with a field update.
C. create a lightning component.
D. create a visualforce page.
  
3) Which task can an administrator accomplish using formula fields in the Opportunity object?

A. Display the unit price of the highest-priced Product that is linked to the Opportunity record
B. Display the parent account's Number on the Opportunity details screen-->ANS
C. Calculate the total amount of all Opportunities related to the parent Account
D. Multiply the amount field by a custom sales tax field in the Opportunity-->ANS

4) An organitation has the following Opportunity trigger code:
for(Opportunity opp: trigger.new) {
    try
    {
        Account acc = [Select id, name from Account where id=:opp.AccountId];
        acc.name =''newAccount;
        update acc;    
    }
    catch (Exception ex) {
        System.debgu(ex);
    }
}



A user upload 170 Opportunities using Data Loader. There is only one Opportunity related to each Account
After the transaction is complete. How many accounts are in the organitation with the name "newAccount"?

A. 0--> ANS
B. 150
C. 100
D. 170

5) A developer writes the following code for an organization that has a large number of Accounts and Opportunities.
 
trigger accountTrigger on Account (before insert, before update) { 
    for (Account a : Trigger.new) {
        List<Opportunity> opptysClosedLost = [SELECT Id, CloseDate FROM Opportunity WHERE AccountId IN :Trigger.newMap.KeySet() AND StageName = 'Closed - Lost'];
        List<Opportunity> opptysClosedWon = [SELECT Id, CloseDate FROM Opportunity WHERE AccountId IN :Trigger.newMap.KeySet() AND StageName = 'Closed - Won'];
        for (Opportunity o: opptyClosedLost) {
            o.ClosedDate = date.today();
            }
        }
    }
trigger accountTestTrggr2 on Acocunt (before insert, before update) {
    List<Opportunity> opptysPipeline = [SELECT id, CloseDate FROM Opportunity WHERE AccountId IN: Trigger.newMap.keySet() AND StageName = 'Pipeline'];
}



What is problematic with this code?
Choose 2 answers

A. Line 8 because this may trigger governor limits
B. Line 12 because there should be one trigger for the same object.-->ANS
C. Line 5 because this should reside in a separate trigger.-->ANS
D. Line 3 because this may trigger governor limits.

6) On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?

A. use the constructor method for the  controller.
B. Use the <apex:detail> tag in the Visualforce page.
C. create a new PageReference object with Id.-->ANS
D. Use the $ACtion.View method in the Visualforce page. 

7) Under what circumstances would a developer most likely use a product from the AppExchange Instead of custom or native features of the platform?

A. when managing essential contact data.
B. when supporting a niche business process.-->ANS
C. when providing basic address maps.
D. when implementing periodic emails to users.

8) A company would like to send an offer letter to a candidate, have the candidate sign it electronically,and then send the letter back.
What can a developer do to accomplish this?

A. develop a Process Builder that will send the offer letter and allow the candidate to sign it electronically.
B. Install a managed package that will allow the candidate to sign documents electronically.
C. Create a visual workflow that will capture the candidate's signature electronically.-->ANS
D. create an assignment rule that will assign the offer letter to the candidate.

9) What is a capability of the force.com IDE? choose 2

A. Roll back deployments.
B. Run apex tests.-->ANS
C. Download debug logs.-->ANS
D. Edit metadata components.-->ANS??

10) What should a developer consider when querying a parent to child relationship for custom objects?

A. the child relationship is a pluralized form and can be customized.
B. the child relationship is a singular form and cannot be customized.
C. the child relationship is a pluralized form and cannot be customized.-->ANS
D. the child relationship is a singular form and can be customized.

11) An sObject named Application__c has a lookup relationship to another sObject named position__c.
 Both application__c and position__c have a picklist field named Status__c, 
 when the Status__c field on position__c is updated. The status__c field on application__c needs to be populated
 automatically with the same value and execute a workflow rule on Application__c 
 How can a developer accomplish this?
 
A. By changing Application__c.Status__c into a roll-up summary field.
B. By changing Application__c.Status__c into a formula field.-->ANS, but a workflow rule execute?
C. By using an apex trigger with a DML operation.
D. By configuring a cross-object field update with a workflow.

12) A developer writes a SOQL query to find child records for a specific parent.
How many levels can be returned in a singles query?

A. 3
B. 1-->ANS
C. 7
D. 5
 
13) What is a benefit of the Lightning Component framework?

A. Better integration with Force.com sites.
B. Better performance for custom Salesforce1 Mobile apps.
C. More centralized control via server-side logic. -->ANS
D.More pre-built components to replicate the Salesforce look and feel. 

14) A workflow updates a custom field after an Account is created.
How can a developer access the update custom field value from a Trigger?

A. by writing an After Update trigger and accessing the field value from Trigger.old
B. by writing  a Before Update trigger and accessing the field from Trigger.new.
C. by writing  an After Insert trigger and accessing the field value from Trigger.old.
D. by writing  a Before Insert trigger and accessing the field value from Trigger.new.-->ANS

Thank you so much,
Lili
 
Adithya SreyajAdithya Sreyaj
Hi Lili..I think i know some of the answers for your questions.
1) D
2) A (with workflow you can only update the record or its parent)
4) A (DML Limit is 150 right?)
8) B
9) B, D
11) C
12) B
13) B, D
Regards,
Adi.

 
surbhi gupta 57surbhi gupta 57
Which two Apex data types can be used to reference a Salesforce record ID dynamically? Choose 2 answers 

A. External ID 
B. ENUM 
C. String 
D. sObject
Paul PapadopulosPaul Papadopulos
Sent to the wrong person Paul Papadopulos | Director, National Sales | Atrium Hospitality Deerfield Point II | 12735 Morris Road Ext, Suite 400 | Alpharetta, GA 30004 Office 4420 Hoffmeister Drive Waxhaw, NC 28173 612-840-4022 | paul.papadopulos@atriumhospitality.com www.atriumhospitality.com
surbhi gupta 57surbhi gupta 57
Hi Send me more questions, as i am also preparing for pd1 Regards Surbhi
Prince PranavPrince Pranav
Which two Apex data types can be used to reference a Salesforce record ID dynamically? Choose 2 answers 

A. External ID - ANS
B. ENUM 
C. String - ANS
D. sObject
Sundar K 12Sundar K 12

Hi,

 

Can we create dynamic SObject in Sales Force using API integration with Node.js?

Sandra PuigvíSandra Puigví
We have some APIs activated in our user but the custom API integration does not work correctly. How can I solve it?