Category Archives: Uncategorized

Salesforce: How to Setup Lightning Sync for Google (Beta)


To sync email from Gmail to Salesforce, use the Lightning for Gmail feature. If you require to sync events from Google Calendar to Salesforce, you will be required to setup Lightning Sync.

See steps below.

Setup Guide

This video will show the step by step to setup Lightning for Google –

Note: Make sure you are using Google Enterprise & you are the admin of the enterprise account.

5 Setup steps –

Lightning Sync for Google (Beta) –

What you need

The below links will need to be opened on your browser:

  1. Salesforce Setup
  2. Gmail Admin Console –
  3. Google API Console –


Prepare Google Account

Step 1: Enable Google API

  1. Go to Google API Console > Create new project. (You can call it Lightning Sync)
  2. Enable Calendar API & Contact API:-
    – Google App API > Calendar API > Enable
    – Google App API > Contact API > Enable
  3. Click on Credential on right panel
    – New Service Account
    – Service Account Name – Company Name
    – Role – Owner
    – Key Type – JSON
    Note: Keep the downloaded JSON file.
  4. Credential > Manage Service Account
    – Company Name > Edit
    – Enable Domain Y Delegation
    – Configure Consent Screen > Fill in anything relevant. Leave optional blank if unsure.

Step 2: Setup Google Admin Console

  1. Go to Gmail Admin Console
  2. Click More Control > Security > Show More > Advance Setting > Manage API Client Access
    – Client Name = Client ID (From Google API Service Account)
    – One or More API Scope =,, > Authorize


Enable Lightning Sync in SF

  1. Go to Salesforce Setup >Quick Find > Lightning Sync Setup > Enable
  2. On the Upload Your Google Private Key section > Click Update > Upload JSON file
    Note: Test connection using Connection Test: Fill in your user email. You will see success message once connected
  3. Setup sync setting
    – Go to Setup > Quick Find > Sync Configuration
    – Create New (You can name it Default)
    – Configure Sync setting on the Data Setting section
  4. Check sync Status
    – Go to Setup > Quick Find > Sync Status
    Note: You can see summary of sync records here

Install Lightning for Gmail extension

  1. Go to this link –
  2. Click Add To Chrome
  3. See this documentation for how to use –

Visualforce: Button Action With Javascript Not Compatible in Lightning

Recently, we were working on a project to convert the existing visualforce page to support the Lightning experience. An issue that I encountered was the command button with javascript action was no longer working in the Lightning experience mode. This was due to the change mentioned in this post. Below is an example:

    <apex:actionFunction action="{!doPassParam}" name="passparam" rerender="mypanel" status="status">
        <apex:param name="selectedRecordId" value="" assignTo="{!selectedRecordId}"/>
    <apex:commandButton value="Submit" action="javascript:passparam('{!recordId}')" rerender="mypanel" style="margin-left: 5px" styleClass="slds-button slds-button--neutral slds-not-selected"/>

The code above shows that we would like to pass a parameter to the controller via actionFunction when the user clicks the button. This will allow it to work in classic mode. However, it will throw an error saying “The page is not supported in Lightning experience” when we try to repeat in the Lightning experience mode.

To get around this issue, use javascript to set the value to a hidden input field. The hidden input field will act as a place holder to submit the value to the controller.

    <script type="text/javascript">
        function setField(fieldId, fieldValue){
            document.getElementById(fieldId).value = fieldValue;
    <apex:commandButton value="Next Level" action="{!doPassParam}" onclick="setField('{!$Component.hiddenvaluefield}', '{!recordId}')" rerender="mypanel" style="margin-left: 5px" styleClass="slds-button slds-button--neutral slds-not-selected" status="reloadStatus"/>
    <apex:inputHidden value="{!selectedRecordId}" id="hiddenvaluefield" />

Note that now the command button will invoke the onclick function first before invoking the doMyAction action.

WDCi Christmas Charity 2016

On 16th and 17th December, our team in Kuala Lumpur has organised a charity event. We have visited an old folks home and a few orphanages. The purpose of this event is to make them feel warmth and love in this Christmas season. We have taken some footages of us preparing for the charity and spending great time with everyone from the homes.

Enjoy and Merry Christmas 😀

The New RIO Inventory 3.2

Hello folks, thanks for your support with RIO Inventory all these years. We are pleased to present to you our latest release, version 3.2. You asked and we delivered, this release now has the following important features:

  • Inventory batching
  • Serialised inventory
  • Picking slips
  • Ability to transfer inventory between warehouses

These features allow you to manage your inventory better in Salesforce, especially when it comes to multiple warehouses inventory management. Feel free to take a look at this page for more details on how this can help with your daily inventory management.

If you are new, don’t worry. You can always install the app into your sandbox or developer instance via AppExchange and feel the zen.

For more other goodies in 3.2, please visit our release notes.  Want new features?  Please let us know, you can contact us at

Oracle RightNow: Retrieving Country and Province IDs

The Country and Province in the address field are entered by IDs via API. Here is how we can retrieve the Country/Province values and their IDs in RightNow interface.

Retrieving Country IDs

  1. Go to Configuration > Databases > Data Dictionary.
  2. Look for Countries in the Tables list.
  3. In the table information, click on the country_id index.


Retrieving Province IDs

  1. Go to Configuration > Databases > Data Dictionary.
  2. Look for Provinces in the Tables list.
  3. In the table information, click on the prov_id index.


Wedid: Dynamic Quote Form Generation based on Record Type


Our customer sends out different types of quote form to the clients based on the type of order (ex. Direct Sales, Booking Order, Rental, etc.). Now, they are moving their business process into Salesforce. In order to meet the requirements on the quote form generation, we have to design an automated process to do so. Based on the type of order record the sales rep created, when he/she generate the quote, the quote form will be uniquely generated based on the record type.


When the user click the button to generate a quote form, it will automatically generate a specified quote form based on the record type specified.

Related Objects Opportunity/Quote
Components Quote
Complexity Moderate

Wedid: Netsuite to CSV


Purpose Migrate data from Netsuite to CSV file format
Applications Netsuite
Versions Netsuite
Tool XML and CSV Export
Information Customer
General Ledger
Data Formats XML and CSV
Volumes < 1,000,000 records
Error Handling Nil, data was exported to required format only
Complexity Simple


Boomi: Boomi Sub-Process Call Execution Behavior

In one of the previous post, we talked about the option of enabling a Boomi sub process call to be executed in a asynchronous manner. However, do you know that this is actually also depending on the Start Shape Option of the sub process?

Start Shape Option Support Synchronous Execution Support Asynchronous Execution
Data Passthrough Yes No
No Data Yes Yes
Connector Call Yes Yes


S-Docs: negative currency

Scenario: Creating S doc templates and pulls out value with negative number. ie: -400.

When we pull out number fields, S Doc will define number format, ie: {{!Opportunity.amount #,###.##}}. Using this format will return value in a form of 1,234.00 But if the value is in negative form, it will return as (1,234.00).

So how do we make S Doc show the negative sign?


1) Create a custom NUMBER formula field.

2) Copy value of the field to display. ie: UnitPrice

negative value formula


3) Pull out the text formula in S Doc template.

This method is applicable to both positive and negative value. 

Talend: Processing Large Data when Using tUniqRow

In Talend, tUniqRow is a useful component which allows you to filter out only the distinct unique row from a set of data. While using this, you may hit into Java Heap Space issue (java.lang.OutOfMemoryError) if the data to be processed is very large (millions of rows).

One possible solution to this is by increasing the JVM so you can process more records.


However, there is a limit to this setting depending on the Physical Memory available in the system. Setting it too high will cause performance issue to the system.


Another way is to use the Use of disk setting in the tUniqRow advanced settings. By using this setting, data will be stored temporarily in the local disk drive and Talend will process the data using the files instead.


This approach is somehow more efficient and will prevent Talend from using excessive system memory to process the data.