Field Service Lightning Certification Preparation and Takeaways

This June, I’ve set a goal to get two Salesforce certifications. Got one down and another to go!
The Field Service Lightning certification I feel is one of the easier certifications among the rest that I have took so far

What helped tremendously on my learning was attending 2 day free training from Salesforce for Field Service Lightning. This quickly got me covering the core principles. While training was still fresh I prepared for the exam for a week. I already have an FSL org to play around so I went through the Trailhead Trailmix with constant checking  on the help documentation for some concepts I did not understand.

There are 60 question plus 5 extra, you are given 90 minutes to complete the exam. Prerequisite to the certification is being Service Cloud certified.

Read the rest of this entry »

How to Send Emails from WordPress on a Google Cloud Compute Instance

Google Compute Engine does not allow outbound connections on ports 25, 465 and 587. These SMTP ports are blocked by default due to abuse.

For sending emails through the Google cloud compute instance Google recommends the following:

  • Relay emails through your G suite(formerly known as Google Apps) account
  • Relay using third party email service such as Sendgrid,  Mailgun or Mailjet.
  • Connect your instance to your network via VPN and use your network to send email

With setting up the relay service we would need to configure and install Postfix. We won’t be installing and configuring Postfix on this tutorial. Instead we would be utilizing a WordPress WP Mail Plugin that would allow us to use a Gmail SMTP to send emails. I recommend setting up a new gmail account just for this purpose.

Read the rest of this entry »

Tips and Takeaways From Getting the Apex Specialist Superbadge

I’ve started the new certification path for the Platform Developer II as I already passed the multiple choice question a long time ago but it was ridiculously hard getting a slot on the programming assignment. With this new format, I would need to complete these four superbadges.

So, 1 out 4 completed. I got the Apex Specialist Superbadge nailed.

For the Apex Specialist superbadge. There are a total of 6 mini challenges you need to complete. Requirements are straightforward. If you been developing on the platform for some time, the challenge should be a breeze. It took me 6 hours though to coymplete the challenge.

Takeaways from the challenge

  1. There are many options for building the solution. Just stick with where you are most familiar with.
  2. Use maps for more efficient querying and to bulkify your triggers
  3. I thought I already know all my JSON stuffs until I tried to manually parse a JSON string. Get familiar with using the JSON class methods. Check my post on Demystifiyng JSON parsing in Apex.
  4. Given another chance since the requirements are not that complicated this would’ve been a good practice to have tried test-driven development.

If you need help completing the challenge hit the comments below and I’ll be glad to help. Good luck on getting that superbadge.

Demystifying JSON Parsing In Apex

You got back a JSON string either as a response from a REST service, passed through from your visual force page via remote action or passed from your lighting component to your apex controller, now how do you parse this information? For simple JSON structures Salesforce can automatically parse them for you. There are tools online that would generate apex classes from the JSON string that would assist in parsing the JSON input.

It is good to get back to the basics and understand a little bit how the JSON string is structured and how the parsing is done.

What is JSON? JSON is the acronym of Javascript Object Notation and is a lightweight format that is used for data exchange between servers and modern applicationsIt is based on a subset of JavaScript language (the way objects are built in JavaScript).

Read the rest of this entry »

Using the Batch Resource Salesforce REST API

While coming up with a solution design for  an API integration piece for work I found the REST API batch resource feature relevant to my use case. The feature has been around since Summer 2015 and I didn’t know much about it then. Basically the batch resource allows you to make multiple request in a single API call.

I needed to come up with a simple solution for creating a single record and has option to pass an array of records to be created. I initially had been looking at 3 options and listed the things to consider on the development side.

  • REST API via the sobject resource
    • use sobject resource for record creation
    • no Apex code
    • cannot do array
  • Apex Rest API
    • accepts an array of the records
    • use of JSON parser and deserializing the request body
    • create test classes
  • Bulk API
    • last option
    • overkill for the job and too many things to consider to get the integration setup

Read the rest of this entry »