Thursday, August 8, 2019

Platform Developer I Certification Maintenance (Spring '19)



Platform Developer I Certification Maintenance (Spring '19)





→ Learn What’s New for Platform Developers in Spring ’19


1. Which Apex interface can be implemented to allow My Domain users to log in with something other than their username and password?
A. Auth.AuthToken
B. Auth.VerificationMethod
C. Auth.LoginDiscoveryHandler
D. Auth.MyDomainLoginDiscoveryHandler

2. With Spring '19, which method returns a list of OrgLimit instances used to investigate limits and their names, current value, and maximum value?
A. getAll() from the System.OrgLimit Class
B. getAll() from the System.OrgLimits Class
C. getInstances() from the System.OrgLimit Class
D. getInstances() from the System.OrgLimits Class

3. With Spring '19, which properties of an unhandled Apex exception are available in Event Monitoring log files?
A. Static variable state and stack trace
B. Exception type, name, and static variable state
C. Stack trace, user's location, and exception type
D. Exception message, exception type name, and stack trace

4. Which field of the SandboxInfo object is a reference to the ID of the SandboxInfo that served as the source org for a cloned sandbox?
A. SourceId
B. TemplateId
C. SandboxName
D. SandboxInfoId

5. You created a custom metadata type to handle your company's warranty policy. The custom metadata type's label is WarrantyRule. For it, you created a custom field labeled Warranty and a metadata record labeled Gold. What is the correct syntax to reference the value stored in the Gold metadata record?
A. $WarrantyRule.Gold.Warranty__c
B. $WarrantyRule__mdt.Gold.Warranty
C. $CustomMetadata.WarrantyRule.Gold.Warranty
D. $CustomMetadata.WarrantyRule__mdt.Gold.Warranty__c

→ Work with the New Apex Security Settings

Launch the org you’ll use for the hands-on challenge, then do the following.

• Create a new custom field on the Contact object to establish a field that contains sensitive information about the secret keys of our customers.
  ○ Field Label: Secret Key
  ○ Type: Text
  ○ Field Name: Secret_Key
  ○ Length: 255

• Uncheck the Visible box for the “Standard User” profile when defining field-level security.

That’s it for setup. You’ll use the code block below to complete the challenge.

SecureApexRest code block:
@RestResource(urlMapping='/secureApexRest')
global with sharing class SecureApexRest {
    @HttpGet
    global static Contact doGet(){
        try{
        Id recordId = RestContext.request.params.get('id');
        Contact result;
        if (recordId == null){
            throw new FunctionalException('Id parameter is required');
        }
        List<Contact> results = [SELECT id, Name, Secret_Key__c FROM Contact WHERE Id = :recordId WITH SECURITY_ENFORCED];
            if (!results.isEmpty()) {
                result = results[0];
            } else {
            throw new SecurityException('You don\'t have access to all contact fields required to use this API');
           }
         return result;
       }catch(System.QueryException e){
          System.debug('error :'+e.getMessage());    
        }
     return null;
   }
public class FunctionalException extends Exception{}
    public class SecurityException extends Exception{}
}

Friday, April 26, 2019

Administrator Certification Maintenance (Spring '19)



Administrator Certification Maintenance (Spring '19)





→ Learn What’s New in Spring ’19


1. On which set of objects can an administrator customize the Stage Setup Flow?
A. Leads and cases
B. Leads and opportunities
C. Account and contacts
D. Campaigns and campaign members

2. How many blocks are available in joined reports?
A. 2
B. 3
C. 5
D. 8

3. An account team is no longer needed. How can the account owner remove the entire team?
A. Create a custom action
B. Use Transfer Account Team
C. Create a Delete Team process builder
D. Use Remove All Members

4. Which set of actions can an administrator take with subtab options in Console?
A. Refresh, customize, promote
B. Promote, publish, close
C. Promote, refresh, delete
D. Refresh, customize, publish

5. For which object can an administrator grant data sharing rules within workflows?
A. Tasks
B. Opportunities
C. Products
D. Contracts

6. Which relative date/time can an administrator specify in a macro when it is run?
A. Months from now
B. Years from today
C. Hours from now
D. Minutes from today

→ Get Hands-on with Lightning Pages


Need to complete trailhead practical module in your personal development org.


Thursday, April 25, 2019

Platform App Builder Certification Maintenance (Spring '19)



Platform App Builder Certification Maintenance (Spring '19)



→ Learn What’s New for App Builders


1. Which permission does an app builder need to access the Flow Builder?
A. Flow Manager
B. Author Apex
C. Manage Flow
D.Lightning Experience User

2. Where can an app builder change the layout of a Lightning page?
A. Page Layout
B. Properties
C. Page Navigator
D. App Options

3. An account team is no longer needed. What action can the account owner take to remove the entire team?
A. Create a custom action.
B. Use Transfer Account Team.
C. Remove all members manually.
D. Use Remove All Members.

4. Which language can an app builder use to build Lightning web components?
A. CSS
B. HTML
C. JQuery
D. Visualforce

5. Which relative set of date/time fields can an app builder specify in a macro when it is run?
A. Now, Time, Date
B. Today, DateTime, Date
C. Time, Date, DateTime
D. DateTime, Time, Today

→ Get Hands-on with Customized Home Pages and Components


Need to complete trailhead practical module in your personal development org.


Tuesday, January 1, 2019

Platform Developer I Certification Maintenance (Winter '19)



Platform Developer I Certification Maintenance (Winter '19)





→ Understand New and Updated Apex Methods, Exceptions, and Interfaces


1. Which method of the DescribeSObjectResult class allows you to access record types by their developer name?
A. getRecordTypeInfos()
B. getRecordTypeInfosById()
C. getRecordTypeInfosByName()
D. getRecordTypeInfosByDeveloperName()

2. Which Apex class includes new methods to verify digital and HMAC signatures?
A. System.Auth
B. System.Crypto
C. System.Approval
D. Schema.Signature

→ Learn What's New for Platform Developers


1. Your org has My Domain enabled. What is the most efficient method to obtain a valid session ID to make an HTTP callout from asynchronous Apex code to Salesforce APIs?
A. Use a Named Credential.
B. Use System.UserInfo.getSessionId().
C. Set the endpoint to URL.getOrgDomainUrl()
D. Session IDs are no longer required when My Domain is enabled.

2. Which annotation allows a developer to make the result of an Apex method storable for Lightning components?
A. @AuraStorable
B. @AuraCacheable
C. @AuraEnabled(storable=true)
D. @AuraEnabled(cacheable=true)

3. Which merge field allows you to isolate untrusted third-party content with <apex:iframe> tag in Visualforce?
A. $Resource
B. $SecureResource
C. $IFrameResource
D. $Page.IFrameResource

4. Prior to installing an unlocked package, which object should a developer query using the Tooling API to list the packages it depends on?
A. InstalledPackage
B. PackageDependency
C. UnlockedPackageInfo
D. SubscriberPackageVersion

→ Work with the Lightning Map Component and Apex Inherited Sharing


Launch the org you’ll use for the hands-on challenge, then create the following custom object and two custom fields.

• Create a custom object that will be used to store information about the various towers in the western States that are owned by Out and About Communications.
  ○ Label: Tower
  ○ Plural Label: Towers

• Create a new custom field to establish a Master-Detail relationship between Tower and Account. Add the Towers related list to the Account page layout.
  ○ Field Label: State
  ○ Type: Master-Detail
  ○ Field Name: State
  ○ Child Relationship Name: Towers

• Create a new custom field to enter the latitude and longitude for the location of each Tower.
  ○ Field Label: Tower Location
  ○ Field Name: Tower_Location
  ○ Type: Geolocation
  ○ Latitude and Longitude Display Notation: Decimal
  ○ Decimal Places: 6

Now add some data.

• Create two new Account records to represent the regions (only the Name field is required).
  ○ Utah
  ○ Idaho

• Create four new Tower records
  ○ Name: Lightning Ridge
  ○ State: Utah
  ○ Latitude: 40.490684
  ○ Longitude: -110.908727

  ○ Name: Craters
  ○ State: Idaho
  ○ Latitude: 43.555375
  ○ Longitude: -113.70069

  ○ Name: Nuckols
  ○ State: Idaho
  ○ Latitude: 47.516694
  ○ Longitude: -115.939163

  ○ Name: Rainbow
  ○ State: Utah
  ○ Latitude: 37.060663
  ○ Longitude: -110.975708

You use the code blocks below to complete the challenge.


TowerMapUtilClass code block:
public  inherited sharing class TowerMapUtilClass {
     public static List<sObject> queryObjects(String theObject, List<String> theFields, String theFilter, String sortField, String sortOrder) {
          String theQuery = 'SELECT ' + string.join(theFields, ',');
          theQuery += ' FROM ' + theObject;
          if(!String.isEmpty(theFilter)) {
               theQuery += ' WHERE ' + theFilter;
          }
          if(!String.isEmpty(sortField)) {
               theQuery += ' ORDER BY ' + sortField;
               if(!String.isEmpty(sortOrder)) {
                    theQuery += ' ' + sortOrder;
               }
          }
          return database.query(theQuery);
     }
}

TowerMapControllerClass code block:
public with sharing class TowerMapControllerClass {
     @AuraEnabled
     public static List<Tower__c> getAllTowers() {
          String theObject = 'Tower__c';
          List<String> theFields = new List<String>{'Id', 'Name', 'State__r.Name', 'Tower_Location__Latitude__s', 'Tower_Location__Longitude__s'};
          String theFilter = '';
          String sortField = 'Name';
          String sortOrder = 'ASC';
          List<Tower__c> allTowers = TowerMapUtilClass.queryObjects(theObject, theFields, theFilter, sortField, sortOrder);
          return allTowers;
     }
}

Towermap Lightning component code block:
<aura:component implements="flexipage:availableForAllPageTypes" controller="TowerMapControllerClass" access="global" >
     <aura:attribute name="mapMarkers" type="Object" access="PRIVATE" />
     <aura:attribute name="markersTitle" type="String" access="PRIVATE" />
     <aura:handler name="init" value="{!this}" action="{!c.handleInit}"/>
     <aura:if isTrue="{!!empty(v.mapMarkers)}" >
          <lightning:map mapMarkers="{!v.mapMarkers}" zoomLevel="5" markersTitle="{!v.markersTitle}"/>
     </aura:if>
</aura:component>

Controller code block:
({
     handleInit: function (component, event, helper) {
          helper.initHelper(component, event, helper);
     }
})

Helper code block:
({
     initHelper : function(component, event, helper) {
          helper.utilSetMarkers(component, event, helper);
     },
     utilSetMarkers : function(component, event, helper) {
          let action = component.get("c.getAllTowers");
          action.setCallback(this, function(response) {
               const data = response.getReturnValue();
               const dataSize = data.length;
               let markers = [];
               for(let i=0; i < dataSize; i += 1) {
                    const Tower = data[i];
                    markers.push({
                        'location': {
                             'Latitude' : Tower.Tower_Location__Latitude__s,
                             'Longitude' : Tower.Tower_Location__Longitude__s
                        },
                        'icon': 'utility:Tower',
                        'title' : Tower.Name,
                        'description' : Tower.Name + ' Tower Location at ' + Tower.State__r.Name
                   });
               }
               component.set('v.markersTitle', 'Out and About Communications Tower Locations');
               component.set('v.mapMarkers', markers);
          });
          $A.enqueueAction(action);
     }
})

Platform App Builder Certification Maintenance (Winter '19)



Platform App Builder Certification Maintenance (Winter '19)





→ Learn What’s New for App Builders


1. Which behavior is true when using the 'Deploy processes and flows as active' feature?
A. Apex tests must cover 75% of all active Processes and autolaunched Flows.
B. Pre-existing Processes and autolaunched Flows are marked as Inactive.
C. The Change Set must include a Permission Set that enables the 'deploy processes and flows as active' feature.
D. The Change Set must include a Permission Set that activates the Processes and Flows.

2. How should an App Builder ensure that Users are able to see Survey responses?
A. Subscribe Users to a Survey with Responses report.
B. Schedule a nightly Apex job to compile Survey statistics.
C. Grant Users See All Data on the Survey object.
D. Grant access to the Survey object then direct users to the Survey Invitations related list.

3. How can a user share the contents of a Salesforce Folder with customers in Lightning?
A. Create a Content Pack.
B. Create a public link to a Shared Folder.
C. Create a ZIP file containing multiple Files.
D. Create a Public Knowledge Base.

4. How can an App Builder configure a Guided Action to be mandatory on a record?
A. Mark the Guided Action Component as Required on the record page.
B. Create a Validation Rule for the record on which the Guided Action is run.
C. Set the Is Mandatory field in a Process that launches the Flow.
D. Set the Is Mandatory Flow public variable in the Flow.

→ Get Hands-on with Lightning Pages


Need to complete trailhead practical module in your personal development org.