Apex Specialist

Superbadge – Apex Specialist

trailhead_superbadge_apex

I have completed the Apex Specialist Superbadge recently and have got 5000 points. Since I see some folks are having issues passing the challenge – thought of putting the configuration and code developed for the same. The details, requirement & Use Case is provided at the Trailhead website Superbadge Apex Specialist.

 

Step 1 :  Install this unmanaged package. [ https://login.salesforce.com/packaging/installPackage.apexp?p0=04t36000000i5UM ]

follow the instruction given on trailhed site to install this package.

Step 2 : Rename Case with Maintenance Request

Step 3 : Rename Product with Equipment

for rename follow this  ==> Setup –> Customize –> Tab Names and Labels –> Rename Tabs and Labels

As you install the package the required custom object and the dummy classes will automaticlly created for you.

Step 4: Now from here your super badge is starting . before processed further please go threw the requirements of this super badge on trailhed site.

superbadges_Apex_images_image_0_d1b7610d2dc3487a22ecd01263bf1ced.png

schema builder.png

Create classes and triggers as follow :

 

Create Trigger “‘MaintenanceRequest”  

Create trigger helper class “MaintenanceRequestHelper”

trigger MaintenanceRequest on Case (before update, after update) {
//         call  MaintenanceRequestHelper.updateWorkOrders  ......

 

public class MaintenanceRequestHelper {
            public static void updateWorkOrders(Map<Id, Case> applicableCases){ ......

 

Create Test class “MaintenanceRequestTest

@isTest
public class MaintenanceRequestTest { ......

 

you can find the complete code over the git repo –  [https://github.com/amitjpr/Thailhead-Solutions/tree/master/Superbadges/Apex]

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s