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 »

Hidden Gems on the Spring 18 Salesforce Release For Developers

Salesforce Spring 18 comes with some pretty nifty updates for developers. Been playing around with some of the new stuffs and will come up with some videos for each as I get in depth with them more.

 

  • Flow Enhancements
    • Ability to add Lightning Components to Flow –  lightning:availableForFlowScreens
    • We can already make Lightning Component as a Quick Action, now you can do that with Flow too
  • New Base Lightning Components
    • This  new base components works together and allows you to build forms faster. It determines the field type, field level security and displays the field styled(LDS) accordingly. Similar to using force:inputInputField but with less controller and apex work.
      • lightning:recordEditForm
      • lightning:inputField
    • New base components – carousel, formattedAddress, formattedName, formattedTime, inputAddress, inputField, listView, pillContainer, treeGrid, and prechatAPI.
  • Salesforce DX
    • Two types of second generation packing
      • ISV type managed packaging
      • Developer controlled packaging – unmanaged packaging but upgradeable. Wuhoo!
  • Component Library
    • View documentation on the base and your custom built lightning components
      • simply add /componentReference/suite.app to the base URL
  • Einstein Vision
    • This soo cool, you can train deep-learning models to detect images and count distinct objects within an image with Einstein Object Detection.
  • UI API
    • Recreate the Salesforce page layout on any web app or mobile app. You can can pretty much do CRUD operations with the API.
  • Some other stuffs worth mentioning
    • Cloning sandbox now in beta
    • Debugging – public site users no longer need a browser cookie to activate debug logging. FTW.
    • Custom metadata in validation rules in pilot

What are your favourite features?

Stay tuned!

Tips and Takeaways from Taking the Lightning Experience Rollout Specialist Superbadge

Been procrastinating and holding off getting this Superbadge for some time as it seems to be too much material to cover. With some deadlines imposed by Salesforce for partners to get accredited for Lightning, I eventually got into it. So I sat this one and got my first superbadge.

There are a total of 8 challenges and 2 quizzes to check your knowledge. Took me around 8-10 hours to finish in a span of three days as I did them after work.

Takeaways from the challenge

  1. First is setting up and installing the managed package on a Trailhead playground requires some fiddling around. Login to trailhead on incognito and create a new playground, get the password for the user and it asks you for a security question just enter “Blank”. After this, you can install the package on that playground.
  2. The lightning migration tool does most of the analysis for you. Go over the readiness reports and relate them to the requirements to come up with a solution.
  3. Check challenge button shows tips on what’s wrong based on your progress on the challenge and sometimes shows more details of the requirement. I find myself checking challenge here and there but if you get stuck then google is your friend and check the developer forums.
  4. If you are not comfortable with a particular challenge, say styling the VF page, read up more or check the associated trailhead badge. I’m pretty sure most admins will get stuck on this one.
  5. You need to switch around classic and lightning to get some configuration or setup done. I got stuck on the Report challenge as the Add Chart button was not showing on Lightning, works well on Classic.

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

Creating a Simple Lightning Component for Salesforce Community Napili Template

Want to create a simple component that any user with System Admin rights can quickly change the text attributes. This component is so easy to create and I’m sharing the process on how to create on here. This component is for non-classic Community template.

Step 1: Launch the Developer Console

Step 2: Create a Lightning Bundle and give it a name

Step 3: Edit the component and specify implements and create the attributes you want, then build the HTML.

Step 4: Create a design file where you specify the design attributes from the component.

Grab the code from

https://github.com/olopsman/basic-lightning-component-footer

Check out the video at

My Take-Away from the Community Cloud Certification Exam

So decided to sit down the Community Cloud certification as my own prerequisite goal before jumping into the Domain Architect exams. The Community Cloud certification was launched last year so very relatively new. It’s a 90 minute allocated exam with 60 questions. A bit lower at 57% passing score compared to the other Salesforce certification exams I took previously.

The questions are very scenario based and having experience setting up one or two from previous projects helps. Here are my take-aways  from the Community Cloud exam. Get familiar with the Community Cloud Certification Guide, make sure you have a good understanding of this 4 core categories – Implementation, Sharing and Security, Community Setup and the Community Builder.

Topics to focus on

  • License types and limits
  • Sharing Sets, Sharing Groups and Super User
  • Internal and External Sharing Model
  • Salesforce1 and access on a mobile browser device
  • Best template to use on a given scenario
  • Napili template functionalities
  • Self Registration, SSO and Social Sign On
  • Reputations
  • Recommendations
  • Moderation
  • Keyword List
  • Lightning Components
  • Knowledge Articles
  • Topics
  • Custom Domain and security
  • Navigation menu
  • Branding
  • Site.com studio
  • Multi Language support
  • Authenticated vs Unauthenticated(Guest) access
  • Provisioning Partner and Community users

 

Hope you find this information useful. Good luck on your preparation.