Platform Developer I Flashcards
A custom object has a workflow rule that updates a field when a certain set of criteria is met. A ‘before update’ Apex trigger has also been defined on the object. What will happen when a user updates a record so that it meets the criteria of the workflow rule?
Choose 1 answer.
A. An exception will be thrown due to a conflict between the two
B. Both will be fired only once
C. The Apex trigger will be fired twice
D. The Apex trigger will be fired first, voiding the Workflow Rule due to the order of execution
C. The Apex trigger will be fired twice
- According to the order of execution, ‘before’ triggers are run, ‘after’ triggers are run, and then workflow field updates are processed. If a field is updated due to a workflow rule, ‘before update’ and ‘after update’ triggers are run again one more time, and only one more time.
A developer is using debug logs to track the business processes that are run automatically in an organization. Which of the following are valid considerations for setting up a trace flag on the Platform Integration User for this use case?
Choose 2 answers.
A. A trace flag can be set on the Platform Integration User to track certain business processes that integrate internal applications.
B. Automated processes such as workflow and assignment rules can be traced using the Platform Integration User.
C. The Platform Integration User is displayed in audit fields when data is synchronized using the Salesforce Integration Cloud.
D. A trace flag can be set on the Platform Integration User to track certain processes created using the Process Builder.
A. A trace flag can be set on the Platform Integration User to track certain business processes that integrate internal applications
C. The Platform Integration User is displayed in audit fields when data is synchronized using the Salesforce Integration Cloud.
- The Platform Integration User is created automatically by Salesforce and the user detail record cannot be maintained.
- Some internal Salesforce applications automatically run their business processes as the Platform Integration User.
- The Platform Integration User shows up in audit fields in the following cases:
1) When an Einstein bot creates a case.
2) When Einstein writes prediction data to records that it is evaluating.
3) When data is synchronized using the Salesforce Integration Cloud. - Automated processes associated with the process builder, workflow rules, and assignment rules cannot be traced using a debug log by setting up a trace flag on the Platform Integration User.
An administrator is trying to send emails to certain users from a sandbox using a workflow email alert, but he has found that emails are not being sent. What action should he take?
Choose 3 answers.
A. Check the email addresses B. Check Email Deliverability setting C. Check the Email Logs D. Check the Workflow Logs E. Check the System Logs
A. Check the email addresses
B. Check Email Deliverability setting
C. Check the Email Logs
- The email deliverability setting can prevent emails from getting sent if it is set to ‘No Access’ or ‘System Email’ only.
- The Email Logs can provide information on whether the email was sent or an error was encountered in the delivery.
- Email invalidation can also prevent production users from receiving generated messages from the sandbox. When a sandbox is created or refreshed, the email address name@email.com becomes name@email.com.invalid. The administrator should check and make sure that the target users have the correct email address.
A developer would like to create a new sObject with default values using the describe information of a similar sObject. Which of the following can be used to obtain information about the type of sObject from an sObject describe result?
Choose 1 answer.
A. getSObject()
B. getType()
C. getSObjectName()
D. getSObjectType()
D. getSObjectType()
- The getSObjectType() method returns the Schema.SObjectType object for the sObject, which can be used to create a similar sObject using the newSObject() method.
Before deleting a record, a complex validation needs to be performed to confirm that the record can be deleted by querying a number of objects. What solution would be most appropriate in this situation?
Choose 1 answer.
A. Flow
B. Validation Rule
C. Apex Trigger
D. Process Builder
C. Apex Trigger
- An APEX trigger would need to be used to perform validation logic upon record deletion, and if the validation fails, stop the deletion action.
- Process Builder cannot be used on record deletion.
- A flow cannot triggered by a record deletion. It has to be triggered by something else such as a button click / link / process / apex.
What are the recommended tools for deploying metadata from one environment to another?
Choose 3 answers.
A. Visualforce Studio Code B. Ant Migration Tool C. Change Sets D. Data Loader E. Unmanaged Packages
A. Visualforce Studio Code
B. Ant Migration Tool
C. Change Sets
- Built on top of the Metadata API, the Ant Migration Tool and Salesforce Extensions for Visual Studio Code are recommended tools for migrating metadata between related or unrelated orgs
- Unmanaged Packages are intended for distributing open-source projects to developers.
- Data Loader is used for importing or exporting records and not for migrating metadata.
Which of the following are valid Apex data types?
Choose 3 answers.
A. Enum B. Blob C. Currency D. Text E. ID
A. Enum
B. Blob
E. ID
Currency and Text are not valid data types. Instead of currency and text, a developer may use Decimal and String data types respectively.
A developer is required to create a customized page that displays data from a web service callout. What controller could the developer use?
Choose 2 answers.
A. Custom
B. Standard
C. Extension
D. Standard List
A. Custom
C. Extension
- A Custom controller should be used as a controller is displaying data from a web service callout and this is not supported in standard controller actions.
- Alternately, an extension can be used if the developer will utilize standard controller actions, and use the extension for adding new actions.
A junior developer frequently experiences governor limit errors when running Apex Triggers. As a senior developer, which of the following are best practices that you could advise?
Choose 2 answers.
A. Use a combination of collections (e.g. maps, lists) and streamlined queries.
B. Use lists to perform DML operations on multiple records.
C. Use an Apex handler class for multiple triggers.
D. Use SOQL queries only within FOR loops.
A. Use a combination of collections (e.g. maps, lists) and streamlined queries.
B. Use lists to perform DML operations on multiple records.
- Utilizing lists and maps to store data obtained from queries is a fundamental technique that is used to make Apex code more efficient.
- A SOQL query can make use of the WHERE clause to query all the data required in Apex code.
- Instead of using DML statements inside FOR loops to perform operations such as insert, update, or delete on individual records, they should be executed using collections outside FOR loops.
Global Insurance has custom objects to represent policies and claims. A policy can have zero or many claims. A claim is always related to a policy. Claims are first assigned to a queue and then later assigned to different members of the claims team. What type of relationship would be used to relate the policy and claim objects?
Choose 1 answer.
A. Self relationship
B. Master-detail relationship
C. Direct relationship
D. Lookup relationship
D. Lookup relationship
- In this case, queues are required to manage and allocate claims. A queue requires an owner field, which is not available on child records in a master-detail relationship, so a lookup relationship between policy and claim would be required.
A developer working for Cosmic Solutions would like to propagate the deletion of a custom object from a developer sandbox to the production org used by the company. Which Salesforce feature or tool can be used for this requirement?
Choose 1 answer.
A. Unmanaged Package
B. Data Loader
C. Change Set
D. Ant Migration Tool
D. Ant Migration Tool
- The Force.com Migration Tool for Apache Ant can be used for propagating destructive changes from one org to another.
What is a debug level?
Choose 1 answer.
A. The debug level specifies the type of information to record in the debug log
B. The debug level specifies the amount of information to record in the debug log
C. The debug level specifies the type of user the debug log will capture information for
D. The debug level specifies the set of log levels for log categories
D. The debug level specifies the set of log levels for log categories
- A debug level is a set of log levels for debug log categories: Database, Workflow, Validation, and so on. You can reuse debug levels across your trace flags.
You are about to deploy a package from UAT environment to Production with the following components:
7 Custom Objects 43 Custom Fields 15 Validation Rules 20 Apex Classes 5 Apex Triggers
What will happen during deployment, provided that running test is set to default?
Choose 1 answer.
A. Running test classes are not required.
B. All local tests are run during the deployment.
C. All local and managed packaged tests are run during the deployment.
D. No test are run during the deployment.
B. All local tests are run during the deployment.
- For deployment to a production organization, all local tests in your organization are run by default.
- Tests that originate from installed managed packages aren’t run by default.
- If any test fails, the entire deployment is rolled back.
What method can be used to obtain metadata information about all the sObjects in an organization and their fields?
Choose 1 answer.
A. describeObjects()
B. describeSObjects()
C. getGlobalDescribe()
D. getGlobalSObjects()
C. getGlobalDescribe()
- The getGlobalDescribe() method can be used to return a map of all sObject names (keys) to sObject tokens (values) for the standard and custom objects defined in an organization.
- The describeSObjects() method can be used to obtain metadata (field list and object properties) for the specified sObject or array of sObjects.
- The sObjects need to be specified when using this method.
- There are no methods named describeObjects() and getGlobalSObjects().
Which of the following statements about delete and undelete DML operations are true?
Choose 3 answers.
A. The undelete operation does not restore the record associations for parent cases.
B. When there is a master-detail relationship, if a parent record is deleted, its children are automatically deleted.
C. Salesforce can restore lookup relationships that have been replaced.
D. Parent accounts (as specified in the Parent Account field on an account) are supported by the undelete operation.
E. Restoring all custom lookup relationships is supported by the undelete operation.
B. When there is a master-detail relationship, if a parent record is deleted, its children are automatically deleted.
D. Parent accounts (as specified in the Parent Account field on an account) are supported by the undelete operation.
E. Restoring all custom lookup relationships is supported by the undelete operation.
- Salesforce only restores lookup relationships that have not been replaced. For example, if an asset is related to a different product prior to the original product record being undeleted, that asset-product relationship is not restored.
- Cascading deletions are supported; if a parent record is deleted, its children are automatically deleted, as long as each child record can be deleted, as in case of master-detail relationships.
- The undelete operation restores the record associations for parent cases (as specified in the ‘Parent Case’ field on a case).
Which of the following statements is true about defining getter methods?
Choose 1 answer.
A. Use the name of the getter method in an expression to display the results of a getter method in a page.
B. Getter methods are suggested to include logic that increments a variable, write a log message, or add a new record to the database.
C. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method
D. The [get] method is used to pass data from Visualforce page to Apex controller.
C. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method
- The ‘set’ method should be used to pass data from Visualforce page to Apex controller. To pass data from an Apex controller to a Visualforce page, use the ‘get’ method.
- The name of the getter method without the ‘get’ prefix should be used to display results from a getter method.
- Also, getter methods should be designed to produce the same outcome, whether they are called once or multiple times for a single page request. It is a best practice for getter methods to be idempotent, that is, to not have side effects. For example, do not increment a variable, write a log message, or add a new record to the database. Visualforce does not define the order in which getter methods are called, or how many times they might be called in the course of processing a request.
- Getter methods return values from a controller. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method, including any Boolean variables.
Project managers would like to be able to record the total amount of hours each team member works on projects. A team member can be related to multiple projects and each project can have multiple team members. How can the developer achieve this?
Choose 1 answer.
A. Create master detail relationships from a junction object ‘Project Team Member’, one to the Project object and one to the Team Member object
B. Create a master-detail relationship on Project and Team Member objects to a junction object ‘Project Team Member’.
C. Create a lookup relationship on both objects to a junction object called Project Team Member.
D. Create a master-detail relationship on the Project object to the Team Member object.
A. Create master detail relationships from a junction object ‘Project Team Member’, one to the Project object and one to the Team Member object
- In this case, as a team member can be related to multiple projects and each project can have multiple team members, a many-to-many relationship is required.
- Creating the many-to-many relationship consists of creating the junction object (e.g. Project Team Member) and creating two master-detail relationships on Project Team Member, one to Project and one to Team Member.
- When creating master-detail relationships, the relationship field is created on the detail object.
- The detail object in this case is Project Team Member.
What are reasons for using a static method or variable?
Choose 3 answers.
A. To use a method or variable without instantiating its class B. To access values of instance member variables of its class C. To store information that is shared across instances of a class D. To persist a variable value beyond the context of a single transaction E. To create a utility method in a class
A. To use a method or variable without instantiating its class C. To store information that is shared across instances of a class E. To create a utility method in a class
- Since all instances of the same class share a single copy of a static variable, it can be used to store information within the context of a transaction.
- For example, a recursive trigger can use a static variable to determine when to exit the recursion by conditionally setting its value.
- A static method can be used as a utility method and is not subject to instance member variables.
- A static method or variable is accessed without instantiating the defining class.
Static variables only persist within the context of a single transaction. Static methods cannot access values of instance member variables of its class.
An organization’s Chief Technology Officer is concerned about the use of third-party images in Visualforce pages due to recent reports from business partners about images stealing usernames and passwords. Which function can a developer use to securely fetch images that are outside an org’s server and prevent them from requesting user credentials?
Choose 1 answer.
A. HTTPS
B. IMAGEURL
C. IMAGEPROXYURL
D. URLFOR
C. IMAGEPROXYURL
- The IMAGEPROXYURL function allows secure retrieval of external images and prevents unauthorized requests for user credentials.
- It can be used on the ‘src’ attribute of a tag or the value attribute of an object.
What are some of the limitations of changing the data type of a custom field?
Choose 3 answers.
A. The file field type in Salesforce Knowledge can be changed as long as it is not referenced in a Apex Class.
B. The option to change the data type of a custom field is not available for all data types.
C. Developers cannot change the data type of a custom field if it is referenced in Apex.
D. Developers cannot change the data type of a custom field that is referenced by a Visualforce page.
B. The option to change the data type of a custom field is not available for all data types.
C. Developers cannot change the data type of a custom field if it is referenced in Apex.
D. Developers cannot change the data type of a custom field that is referenced by a Visualforce page.
- In Salesforce Knowledge article types, the file field type cannot be converted into other data types.
- The option to change the data type of a custom field is not available for all data types.
- For example, existing custom fields cannot be converted into encrypted fields nor can encrypted fields be converted into another data type. Data type of fields that are referenced by Apex Class/Visualforce page cannot be changed easily.
Sending and receiving change sets can be done between which of the following?
Choose 2 answers.
A. Developer Sandbox to Production.
B. Developer Edition to Developer Edition
C. Developer Edition to Production.
D. Sandbox to Sandbox.
A. Developer Sandbox to Production.
D. Sandbox to Sandbox.
- Change sets are not available in Developer Edition orgs.
- Change sets are available in some editions, including Enterprise and Unlimited.
A Visualforce page created by a developer needs to be added to a custom record page in Lightning Experience. However, the page uses Salesforce Classic styling which does not match the rest of the user interface. What should be done to ensure that the page uses Lightning Experience styling instead?
Choose 1 answer.
A. An option to switch to Lightning Experience styling needs to be enabled by editing the Visualforce page in Setup
B. The Visualforce page needs to be created again in Lightning Experience Setup
C. The ‘lightningStylesheets’ attribute should be set to ‘true’ in the tag
D. The tag should be used to include a custom style
C. The ‘lightningStylesheets’ attribute should be set to ‘true’ in the tag
- Using would require creating a custom style sheet as a static resource. It would also make it harder to ensure that the page styling matches that of Lightning Experience.
What trigger context variable will return true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call?
Choose 1 answer.
A. oldMap
B. isUndelete
C. isExecuting
D. isUpdate
C. isExecuting
- The isExecuting context variable returns true if any code inside trigger context is executing.
- This means you can test whether a particular trigger is executing or not by the help of this variable.
A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. For which situation would a standard list controller be sufficient? Choose 1 answer.
A. Run the Visualforce page entirely in system mode
B. Make a callout to an external web service
C. Using object record pagination.
D. Overriding existing standard functionality
C. Using object record pagination
- You can add pagination to a page using a list controller by utilizing the ‘next’ and ‘previous’ actions using a StandardListController.
Which of the following components are not available to deploy using the Metadata API?
Choose 2 answers.
A. Global Picklist
B. Fiscal Year
C. Queues
D. Currency Exchange Rates
B. Fiscal Year
D. Currency Exchange Rates
- Certain components cannot be retrieved or deployed with Metadata API, and changes to them must be made manually in each organization.
- These include components such as
- Account Teams
- Case Team Roles
- Currency Exchange Rates
- Fiscal Years
Universal Containers would like to see a Red / Yellow / Green Traffic Light representation on the Opportunity detail page, based on the value in the Opportunity Probability field. What would you use to achieve this?
Choose 1 answer.
A. Image Field
B. Master Detail Relationship
C. Rich Text Field
D. Formula Field
D. Formula Field
- An image (stored in documents) can be displayed conditionally using a formula field using the IMAGE() function.
Which of the following statements are true about Apex generic exceptions and built-in exceptions?
Choose 3 answers.
A. The generic Exception catches all exception types except LimitException
B. The LimitException can be caught by using a combination of one or more Exception types.
C. NoAccessException occurs when there is a problem with unauthorized access such as trying to access an sObject that the current user does not have access to.
D. NullPointerException occurs when there is a problem with unauthorized access, such as trying to access an sObject when the current user does not have access to it.
E. QueryException occurs when there is a problem with SOQL queries.
A. The generic Exception catches all exception types except LimitException
C. NoAccessException occurs when there is a problem with unauthorized access such as trying to access an sObject that the current user does not have access to.
E. QueryException occurs when there is a problem with SOQL queries
- The LimitException can never be caught.
- So, the generic Exception will be able to catch all exception types except for LimitException.
Which of the following ways can be used to throw a custom exception?
Choose 3 answers.
A. throw new myCustomException().setMessage('Error Message Here'); B. throw new myCustomException('Error Message Here'); C. throw new myCustomException(e); D. throw new myCustomException(); E. throw new myCustomException().addError('Error Message Here');
B. throw new myCustomException('Error Message Here'); C. throw new myCustomException(e); D. throw new myCustomException();
You can construct exceptions:
- With no arguments: new MyException()
- With a single String argument that specifies the error message: new MyException(‘This is bad’)
- With a single Exception argument that specifies the cause and that displays in any stack trace: new MyException(e)
- With both a String error message and a chained exception cause that displays in any stack trace: new MyException(‘This is bad’, e)
Given the traditional FOR loop standard syntax:
for (initialization; exit_condition; increment) {
statement(s)
}
How does the for-loop sequentially perform its operation?
I. The initialization expression initializes the loop.
II. The code block will be executed.
III. Evaluate the exit_condition. If true, the loop continues. If false, the loop exits.
IV. Execute the increment statement and evaluate the exit_condition again.
Choose 1 answer.
A. I, II, IV, III
B. III, I, II, IV
C. I, III, II, IV
D. I, II, III, IV
C. I, III, II, IV
- First, the initialization statement will be executed. Multiple variables can be declared and/or initialized in this statement.
- Then the exit_condition is evaluated. If the expression evaluates to true, the loop continues. If false, the loop exits.
- Then the code block inside the loop will be executed. At the end of the code block, the increment expression will be executed.
- Finally the exit_condition expression will be evaluated again, either continuing the loop, or exiting as determined by the evaluation
What is the procedure for unit testing?
Choose 1 answer.
A. Create test data, call the method being tested, verify results
B. Create test data, call the method being tested, verify results, delete any records created
C. Create test data, run all tests, verify results, delete any records created
D. Create test data, run all tests, delete any records created, and verify the results
A. Create test data, call the method being tested, verify results
All unit tests follow the same steps:
1) Create test data
2) Call the Apex class method in the test method
3) Verify results
Data is not committed so it does not need to be deleted.
An administrator working for Cosmic Solutions has created a formula field on the Opportunity object to calculate discount based on the values of some fields on the object. A developer who is using the formula field in an Apex class wants to determine whether it treats any blank number fields as zeros. Which method of the DescribeFieldResult class can be used to obtain the information for this use case? Choose 1 answer.
A. isFormulaTreatNullNumberAsZero()
B. isFormulaTreatBlankNumberAsZero()
C. isFormulaNullNumberZero()
D. isFormulaBlankNumberZero()
A. isFormulaTreatNullNumberAsZero()
- The isFormulaTreatNullNumberAsZero() method of the DescribeFieldResult class returns true if null is treated as zero in a formula field, and false otherwise.
How can a developer check if the current user is able to view a particular field?
Choose 1 answer.
A. Use the isAccessible() method of the DescribeFieldResult Class
B. Use the isViewable() method of the DescribeField Class
C. Use the isViewable() method of the DescribeFieldResult Class
D. Use the isAccessible() method of the DescribeField Class
A. Use the isAccessible() method of the DescribeFieldResult Class
- The isAccessible() method of the DescribeFieldResult class returns true if the current user can see the field.
The developer executes the code below and an error is returned indicating that a variable is not properly declared.
String str = new String(); public void stringDisplay() { str = 'Hello'; system.debug(str); }
What is the proper way of declaring a String data type variable?
Choose 1 answer.
A. String new = str String();
B. String str;
C. String = str();
D. Text str;
B. String str;
- String is a primitive data type, so it does not need to be instantiated with a new() command. It can be declared with or without an initial value:
- String variableName; OR
- String variableName = ‘value’
When to use an ‘after insert trigger’ (or after update) ?
- Use only after insert, after update when you want update a field in second object if theres a change of field in the first object
What are the restrictions on object and fields when referenced into APEX ?
- A custom object or field that is referenced in Apex or Visualforce page cannot be deleted
- The datatype or API name of a custom field referenced by Apex code or Visualforce pages cannot be changed
- There may be data loss in Apex code when length or decimal place of a field is modified
- If schema relationships are modified, Apex code referring to relationships need to be updated
What are the reasons for which we would need some APEX or Visualforce coding <> declarative customization
- Scheduled jobs
- Complex reporting
- Email processing
- Automated record sharing
In order to ensure that order records in Salesforce comply with a policy of Cosmic Sporting Goods, a Salesforce Consultant needs to display the conversion rate for an order’s currency on the order detail page. Which formula function can be utilized for this use case?
Choose 1 answer.
A. CURRENCY
B. CURRENCYRATE
C. CURRENTRATE
D. CONVERSIONRATE
B. CURRENCYRATE
- The CURRENCYRATE formula function can be used in a formula field to return the conversion rate to the corporate currency for the given currency ISO code.
Which of the following are true regarding developing in the Salesforce multi-tenant environment?
Choose 2 answers.
A. It is not possible to index application data as each tenant stores different types of data in the same application table
B. Queries need to be selective in terms of the number of records returned
C. Salesforce delivers polyglot persistence transparently
D. The custom domain feature ensures that different customers do not access each other’s data
B. Queries need to be selective in terms of the number of records returned
C. Salesforce delivers polyglot persistence transparently
- Force.com integrates and optimizes several different data persistence technologies to deliver transparent polyglot persistence. Only a single API needs to be coded to, no matter which type of persistence is optimal for a given situation.
- The platform monitors queries and DML operations and throws a runtime exception if they exceed governor limits.
Which of the following debug log sections contains the version of the API used during the transaction and the log category and level used to generate the log?
Choose 1 answer.
A. Header
B. Execution Units
C. Log Lines
D. Code Units
A. Header
A debug log has the following sections:
- The header contains the version of the API used during the transaction and the log category and level used to generate the log.
- An execution unit is equivalent to a transaction. It contains everything that occurred within the transaction. EXECUTION_STARTED and EXECUTION_FINISHED delimit an execution unit.
- A code unit is a discrete unit of work within a transaction.
- And, Log lines are included inside units of code and indicate which code or rules are being executed.
What is true regarding using the Visual Studio Code for deploying code?
Choose 2 answers.
A. Visual Studio Code can be used for deploying code but only from one sandbox to another
B. Visual Studio Code cannot be used for deploying code
C. Visual Studio Code can be used to deploy code to production
D. Visual Studio Code can be used to deploy specific metadata components to another org
C. Visual Studio Code can be used to deploy code to production
D. Visual Studio Code can be used to deploy specific metadata components to another org
A developer would like to reference a JavaScript library while developing a Lightning component. Which of the following considerations should be kept in mind while using an external JavaScript library for such a use case?
Choose 3 answers.
A. The library must be uploaded to Salesforce as a static resource
B. The ‘init’ event handler should be used to access scripts
C. A set of resources can be loaded using the ‘scripts’ attribute
D. A tag can be used in the .cmp or .app markup to reference the library
E. $Resource is used to include the name of the JavaScript resource
A. The library must be uploaded to Salesforce as a static resource
C. A set of resources can be loaded using the ‘scripts’ attribute
E. $Resource is used to include the name of the JavaScript resource
- An external JavaScript library that needs to be used in a Lightning component must be uploaded as a static resource.
- A tag is used in the .cmp or .app markup to include the resource.
- $Resource is used to include the name of the static resource.
For example, , where resourceName is the name of the static JavaScript resource. - The ‘scripts’ attribute can be used to load a set of resources using a comma-separated list.
- The ‘init’ event handler should not be used to access the scripts since they load asynchronously and are most likely not available when the init event handler is called.
A developer has written an Apex class that performs some operation on newly created Opportunity records. However, it does not produce the desired result when users create new records. If five checkpoints have been set up in the class by the developer, how can the Checkpoint Inspector be utilized to debug the Apex class? Choose 2 answers.
A. The Types panel shows the objects that were instantiated when a checkpoint was executed
B. The field values of an object’s instance can be viewed under the State panel
C. The Reference panel shows all symbols in memory at a particular checkpoint using a tree view
D. The Instances panel can be used to review the states of various objects at any checkpoint with the help of unique names
A. The Types panel shows the objects that were instantiated when a checkpoint was executed
B. The field values of an object’s instance can be viewed under the State panel
The Checkpoint Inspector has two tabs, namely, Heap and Symbols. The Heap tab shows the following three panels:
1) Types – It shows the objects that were instantiated and the memory consumed in bytes.
2) Instances – It shows the instances of a particular object type.
3) State – It shows the object’s fields and values at a particular checkpoint.
The Symbols tab displays all symbols in memory at a checkpoint using a tree view.
An administrator needs to get records with locations saved in geolocation or address fields as individual latitude and longitude values.
Which SOQL statement accomplishes this goal?
Choose 1 answer.
A. SELECT Id, Name, Location__latitude__c, Location__longitude__c FROM CustomObject__c
B. SELECT Id, Name, Location__r.latitude, Location__r.longitude FROM CustomObject__c
C. SELECT Id, Name, Location__latitude__s, Location__longitude__s FROM CustomObject__c
D. SELECT Id, Name, Location__r.latitude__c, Location__r.longitude__c FROM CustomObject__c
C. SELECT Id, Name, Location__latitude__s, Location__longitude__s FROM CustomObject__c
Records with locations saved in geolocation or address fields as individual latitude and longitude values can be retrieved by appending ‘__latitude__s’ or ‘__longitude__s’ to the field name, instead of the usual ‘__c’.
What method displays a custom error message on a particular record and prevents any DML operations thereafter?
Choose 1 answer.
A. throwError(errMsg)
B. clear(errMsg)
C. addError(errMsg)
D. add(errMsg)
C. addError(errMsg)
- The addError(errMsg) method can be invoked at the record or field level within the trigger context to flag a record as invalid.
- It marks a record with a custom error message and prevents any DML operations from occurring.
A developer can write code to process records that allow successful inserts and record errors for unsuccessful inserts without rolling back the transaction. This is called partial processing. However, this method will not throw an exception. How should a developer handle the possible exceptions?
Choose 1 answer.
A. Use Database.SuccessResult Class
B. Use Database.ErrorResult Class
C. Use Database.EachResult Class
D. Use Database.SaveResult Class
D. Use Database.SaveResult Class
- Partial processing returns the results of an insert or update operation in an array of Database.SaveResult objects.
- One can loop through the array and determine which records failed or succeeded by using the isSuccess method of the SaveResult object.
- The getErrors method is then used to get error information on the records that failed
What are the basic functions of a standard controller ?
- Save, Edit, Cancel, Delete, QuickSave and List
- Standard controllers exist for all main standard objects and a standard controller is created automatically for all new custom objects
- 5 levels deep Child-Parent and 1 level deep Parent-Child
- Controller extension is used to extend or override the standard controller functions and the logic is executed in User mode
- Custom controller is used to add new functionality and it executes in system mode