Saturday, January 1, 2022

Platform Developer I Certification Maintenance (Winter '22)



Platform Developer 1 Certification Maintenance Winter 22


Platform Developer I Certification Maintenance (Winter '22)



→ Get Ready for the Hands-on Challenge

In the hands-on challenge below, you’ll have an opportunity to work with the new Custom Metadata getInstance method to replace SOQL.
Launch the org you’ll use for the hands-on challenge, then follow below steps:
Create a Custom Metadata Type.

Step: 1
Find 'Custom Metadata Types' in 'Quick find' box and select the same option.
Click the 'New Custom Metadata Type' button.

Step: 2
As mentioned in trailhead challenge, enter 'Label' and 'Plural Label' values, leave all options as it is,
    • Label: Country Code
    • Plural Label: Country Codes
And click 'Save' button.

Step: 3
Click 'New' button in 'Custom Fields' section for creating new field in custom metadata.

Step: 4
Select 'Text' data type and click 'Next' button.

Step: 5
As mentioned in trailhead challenge, enter 'Field Label' and 'Length' values,
    • Field Label: Country Code
    • Length: 3
And click 'Next' button.

Step: 6
Leave all options as it is and click 'Save' button.

Step: 7
Now, click on 'Manage Country Codes' button for creating new record for custom metadata.

Step: 8
Click 'New' button.

Step: 9
As mentioned in trailhead challenge, enter 'Label' and 'Country Code' values,
    • Label: Canada
    • Country Code: CAN
And click 'Save' button.

Step: 10
After saving the record, it will look like below screenshot.

Step: 11
Now, as mentioned in trailhead challenge, we need to create one apex class.

To open the Developer Console from Salesforce Classic:

  1. Click Your Name.
  2. Click Developer Console.

To open the Developer Console from Lightning Experience:

  1. Click the quick access menu (Setup gear icon).
  2. Click Developer Console.
Follow below steps in developer console
~ File > New > Apex Class

Step: 12
As mentioned in trailhead challenge, enter 'Apex Class' name and click 'OK' button.
Class Name: CountryCodeHelper

Step: 13
Copy below mentioned code and paste in developer console and 'save' this apex class.

CountryCodeHelper code:
public class CountryCodeHelper {
	public static string getCountryCode(String country) {
		Country_Code__mdt countryCode = Country_Code__mdt.getInstance(country);
		return countryCode.Country_Code__c;
	}
}

Note: To keep your certification, complete the Platform Developer 1 Certification Maintenance (Winter '22) Module by Dec 7, 2022.