SFDC PD1 Practice Set 3

Descripción

Test sobre SFDC PD1 Practice Set 3, creado por SFDC Forum el 30/08/2018.
SFDC Forum
Test por SFDC Forum, actualizado hace más de 1 año
SFDC Forum
Creado por SFDC Forum hace más de 6 años
2659
2

Resumen del Recurso

Pregunta 1

Pregunta
The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different construction jobs, and track the dates and cost associated with each job. More than one piece of machinery can be assigned to one construction job. What should a developer do to meet these requirements?
Respuesta
  • Create a lookup field on the machinery object to the construction job object
  • Create a junction object with Master-Detail Relationship to both the machinery object and the construction job object.
  • Create a lookup field on the construction job object to the machinery object
  • Create a Master-Detail lookup field on themachinery object tothe construction job object

Pregunta 2

Pregunta
Which three tools can deploy metadata to productions? Choose 3 answers.
Respuesta
  • Data Loader
  • Change set from sandbox
  • Change set from developer org
  • Force.com IDE
  • Metadata API

Pregunta 3

Pregunta
How should a developer create a new custom exception class?
Respuesta
  • Public class CustomException extends Exception{}
  • CustomException ex = new (CustomException) Exception();
  • (Exception) CustomException ex = new Exception();
  • Public class CustomException implements Exception{}

Pregunta 4

Pregunta
Which two number expression evaluate correctly? Choose 2 answers
Respuesta
  • Integer I = 3.14159;
  • Decimal D = 3.14159;
  • Long I = 3.14159;
  • Double D =3.14159;

Pregunta 5

Pregunta
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. What steps should the developer take to resolve the issue and properly test the exception?
Respuesta
  • Use the finally block within the unit test to populate the exception
  • Use database methods with all or none set to False
  • Use try/catch within the unit test to catch the exception
  • Use Test.isRunningTest() within the custom Controller

Pregunta 6

Pregunta
A developer has the controller class below: Public with sharing class myFooController { Public integer prop { get; private set;} } Which code block will run successfully in an execute anonymous window?
Respuesta
  • myFooController m = new myFooControler ();\ System.asseert(m.prop==null);
  • myFooController m = new myFooControler ();\ System.asseert(m.prop==1);
  • myFooController m = new myFooControler ();\ System.asseert(m.prop==0);
  • myFooController m = new myFooControler ();\ System.asseert(m.prop=!null);

Pregunta 7

Pregunta
What is a benefit of using an after insert trigger over using a before insert trigger?
Respuesta
  • An after insert trigger allows a developer to bypass validation rules when updating fields on the new records
  • An after insert trigger allows a developer to make a callout to an external service.
  • An after insert trigger allows a developer to insert other objects that reference the new records
  • An after insert trigger allows a developer to modify fields in the new record without a query.

Pregunta 8

Pregunta
While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard Pricebook since one already exist in the org. how should the developer overcome this problem?
Respuesta
  • Use @IsTest(SeeAllData=true) and delete the existing standard Pricebook.
  • Use @TestVisible to allow the test method to see the standard Pricebook.
  • Use Test.getStandardPricebbokId()to get the standard Pricebook ID.
  • Use Test.loaddata() and a Static Resource to load a standard Pricebook.

Pregunta 9

Pregunta
When an Account’s custom picklist field called Customer Sentiment is changed to a value of “Confused,” a new related Cases should automatically be created. Which two methods should a developer use to create this case? Choose two answers
Respuesta
  • Process Builder
  • Custom Button
  • Apex Trigger
  • Workflow Rule

Pregunta 10

Pregunta
How can a developer set up a debug log on a specific user?
Respuesta
  • Ask the user for access to their account credentials, log in as the user and debug the issue.
  • Create apex code that logs code actions into a custom object
  • It is not possible to setup debug lots for users other than yourself.
  • Set up a trace flag for the user, and define a logging level and time period for the trace.
Mostrar resumen completo Ocultar resumen completo

Similar

Las Matemáticas
María Salinas
Historia Contemporánea: Los fascismos
María Salinas
ECOLOGÍA
chinaa25
Diferencias entre el latín culto y el latín vulgar
Carlos' Badillo Hdez
irregular verbs
Rosalia Ruiz Jurado
Diseño experimental
Ahtziri Sequeira
MAPA MENTAL UNIDAD 1 DIBUJO DE INGENIERIA
Sergio Fernandez
=ARTE=...
JL Cadenas
¿Conozco las herramientas de diseño AutoCAD?
Sonia Rojas Barbosa
TÍTULO DE LA LECTURA
Senaju Perú
Sistemas nervioso y reproductivo
JORGE LEYVA RIVERA