• Konstruktor
  • NEWBIE
  • 14 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
I have a picklist on parent. And I need to copy value from this field on parent to apropriate field on child then a trigger on this child object will fire. Please, help.

I am a little bit confused about these questions

1. Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
According this article https://help.salesforce.com/articleView?id=process_which_tool.htm&language=en_US&type=0
A. Create activities at multiple intervals (Workflow can't create activities, only tasks)
B. Submit a contract for approval (Workflow can't create submit for approval. Only Visual Workflow) 
C. Send an outbound message without Apex code + (Only this answer is correct as for me)
D. Copy an account address to its contacts  (Update fields: The record or its parent. In our situation contact is child, and we can't update contacts' fields) 

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 junction object to relate many engines to many parts through a lookup relationship
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 master-detail relationship

3. 
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 and Unmanaged Package from the AppExchange that provides a Custom Visualforce
B. Copy the standard page and then make a new Visualforce page for product data entry
C. Create a new Visualforce page and an Apex controller to provide Product data entry
D. Download a Managed Package from the AppExchange that provides a custom Visualforce

4. 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 the Position__c 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 page for a single Position__c record? 
A. Utilize the Standard Controller for position__c and a Controller Extension to query for Review__c data. 
B. Utilize the Standard Controller for Position__c and cross-object Formula fields on the job_Application__c object to display Review__c data.
C. Utilize the Standard Controller for Position__c and cross-object Formula fields on the Review__c object to display Review__c data.
D. 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

5. 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 lookup relationship in the Applications custom object to the Job Postings custom object
B. Create a master-detail relationship in the Application custom object to the Job Postings custom object.
C. Create a lookup relationship on both objects to a junction object called Job Posting Applications.
D. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.

6. 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 using an Apex trigger with a DML operation
C. By changing Application__c.Status__c into a formula field
D. By Configuring a cross-object field update with a workflow

7. On a visualforce page with a custom controller, how should a developer retrieve a record by using and ID that is passed on the URL?
 A. Create a new PageReference object with the id
B. Use the <apex:detail> tag in the Visualforce page
C. Use the $Action.View method in the Visualforce page
D. Use the contructor method for the controller.

8. 
The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. What would a developer do to meet this requirement? 
A. Create a Workflow Rule on the Opportunity object that updates a field on the parent Account.
B. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field.
C. Create a trigger on the Account object that queries the Close Date of the most recent Opportunities.
D. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field.

I want to know not only answers but clearly explaination, why this answer is correct. Please, help. Thanks in advance.

Can we find unused methods in Apex code and maybe in Visualforce?

Hi, All

Try to run canvas app in Salesforce after deploy the Web App to Heroku. But in salesforce get "This App must be invoked via a signed request" instead the message Hello User.FullName. Following all instructions during Canvas Developer Guide. (https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/quick_start_update_canvas_app_heroku.htm)

index.jsp 

<%@ page import="canvas.SignedRequest" %>
<%@ page import="java.util.Map" %>
<%
    // Pull the signed request out of the request body and verify/decode it.
    Map<String, String[]> parameters = request.getParameterMap();
    String[] signedRequest = parameters.get("signed_request");
    if (signedRequest == null) {%>
        This App must be invoked via a signed request!<%
        return;
    }
    String yourConsumerSecret=System.getenv("CANVAS_CONSUMER_SECRET");
    //String yourConsumerSecret="1818663124211010887";
    String signedRequestJson = SignedRequest.verifyAndDecodeAsJson(ssignedRequet[0], yourConsumerSecret);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>

    <title>Hello World Canvas Example</title>

    <link rel="stylesheet" type="text/css" href="/sdk/css/canvas.css" />

    <!-- Include all the canvas JS dependencies in one file -->
    <script type="text/javascript" src="/sdk/js/canvas-all.js"></script>
    <!-- Third part libraries, substitute with your own -->
    <script type="text/javascript" src="/scripts/json2.js"></script>

    <script>
        if (self === top) {
            // Not in Iframe
            alert("This canvas app must be included within an iframe");
        }

        Sfdc.canvas(function() {
            var sr = JSON.parse('<%=signedRequestJson%>');
            // Save the token
            Sfdc.canvas.oauth.token(sr.oauthToken);
            Sfdc.canvas.byId('username').innerHTML = sr.context.user.fullName;
        });

    </script>
</head>
<body>
    <br/>
    <h1>Hello <span id='username'></span></h1>
</body>
</html>

Please help

I am a little bit confused about these questions

1. Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
According this article https://help.salesforce.com/articleView?id=process_which_tool.htm&language=en_US&type=0
A. Create activities at multiple intervals (Workflow can't create activities, only tasks)
B. Submit a contract for approval (Workflow can't create submit for approval. Only Visual Workflow) 
C. Send an outbound message without Apex code + (Only this answer is correct as for me)
D. Copy an account address to its contacts  (Update fields: The record or its parent. In our situation contact is child, and we can't update contacts' fields) 

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 junction object to relate many engines to many parts through a lookup relationship
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 master-detail relationship

3. 
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 and Unmanaged Package from the AppExchange that provides a Custom Visualforce
B. Copy the standard page and then make a new Visualforce page for product data entry
C. Create a new Visualforce page and an Apex controller to provide Product data entry
D. Download a Managed Package from the AppExchange that provides a custom Visualforce

4. 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 the Position__c 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 page for a single Position__c record? 
A. Utilize the Standard Controller for position__c and a Controller Extension to query for Review__c data. 
B. Utilize the Standard Controller for Position__c and cross-object Formula fields on the job_Application__c object to display Review__c data.
C. Utilize the Standard Controller for Position__c and cross-object Formula fields on the Review__c object to display Review__c data.
D. 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

5. 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 lookup relationship in the Applications custom object to the Job Postings custom object
B. Create a master-detail relationship in the Application custom object to the Job Postings custom object.
C. Create a lookup relationship on both objects to a junction object called Job Posting Applications.
D. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.

6. 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 using an Apex trigger with a DML operation
C. By changing Application__c.Status__c into a formula field
D. By Configuring a cross-object field update with a workflow

7. On a visualforce page with a custom controller, how should a developer retrieve a record by using and ID that is passed on the URL?
 A. Create a new PageReference object with the id
B. Use the <apex:detail> tag in the Visualforce page
C. Use the $Action.View method in the Visualforce page
D. Use the contructor method for the controller.

8. 
The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. What would a developer do to meet this requirement? 
A. Create a Workflow Rule on the Opportunity object that updates a field on the parent Account.
B. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field.
C. Create a trigger on the Account object that queries the Close Date of the most recent Opportunities.
D. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field.

I want to know not only answers but clearly explaination, why this answer is correct. Please, help. Thanks in advance.

Can we find unused methods in Apex code and maybe in Visualforce?
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