Category Archives: Company Update

Distribution Engine App: Assignment Algorithm

Distribution Engine allows you to choose the types of algorithm matching. For example, assign owner based on certain criteria in the record.

Round Robin

Sequential assignment among the team member that ensures objects are assigned out fairly. For example:

Assignment / User User 1 User 2 User 3
Record #1 1  x  x
Record #2  x 2  x
Record #3  x  x 3
Record #4 4 x x
Record #5 x 5 x
Record #6 x x 6

Sequence used for the round robin will order by who was assigned to last. This ensures that the team members who have not been assigned to recently are first in line.

Round robin with sticky assignment

Sticky assignment assigns duplicated records to the same owner. For example, duplicated records with same email address will be assigned to the same owner.

Note!: Sticky assignment is case sensitive.

Round robin lookup owner

Match records in other objects and assign to the same owner. For example, Lead has the same company name as account name, assign to the same owner.

Note: This matching algorithm is NOT case sensitive.

Salesforce: Sending Email to Custom Email Address

Question: Imagine that you have a custom email field name – ‘Secondary Email Address’. When sending an email to a Contact, can you send it to the secondary email address instead of the Contact email address?

Answer: Yes, you can. When sending out an email, you should be able to choose whether if you would like to send it to the primary email address or any other email addresses. For example:

Second email

NOTE!: This feature is available for Contact & Person Account. It is not available for Account or Opportunity.

Salesforce: Restoring Deleted Records from Recycle Bin

Usually after a record is being deleted, it will be stored in the recycle bin for 15 days. These records are being recognised by a checkbox field called IsDeleted. When a record is being deleted, this checkbox will automatically be checked.

Question: Can we update the IsDeleted checkbox to True?

Aparently this checkbox is made READ ONLY. So how can we restore records from the recycle bin?

WARNING: You will not be able to restore any records if they are being HARD DELETED.

Method #1: Manual restore

If you only have a few data, suggest that you restore them manually. Simple go to Home -> Recycle Bin, select the records that you would like to restore and click on ‘Undlete’ button.

* Once records are restored, any child tied to these records will also be restored.

Method #2: Developer Console

You can try running a few lines of codes in the developer console. Depending on the scenario, you can program the code to restore based on different condition.

For example: Restore all Account where Isdeleted = TRUE and Created Date = TODAY().

Method #3: Re-importing deleted records

You can use Apex Data Loader to export all deleted data and re-import them. Apex Data Loader ‘Export All’ allows you to export ALL data including any soft deleted data (in recycle bin).

*This will not restore any child records as this method is as if you are re-importing all the data from scratch.*

Method #4: Workbench

You can also try Salesforce Workbench where it can query all deleted records and undelete them straight from Workbench.

Salesforce: Restrict Opportunity to Specific Pricebook

Question: Is there anyways that you can restrict specific Account to only use a specific Pricebook? For example, Account – Acme Pty Ltd needs to be tied to only Acme Pricebook. Therefore, all the Opportunity created under Acme Pty Ltd can only use Acme Pricebook.


Option #1: Validation rule

  1. Create a lookup from Account to Price Book
  2. Create a validate rule on the Opportunity – check the PriceBook ID on Opportunity against Price Book on the account. Throw error if does not match.
    For example: Pricebook2Id <> Account.Price_Book__c.


Option #2: Trigger

  1. Create a lookup from Account to Price Book
  2. Create a trigger on Opportunity to populate the Price Book ID from the account
  3. Optional: You can also validate in the trigger if the sales rep tries to change the price book.


Additionally, you can also implement a checkbox in Opportunity to apply flexibility to above solutions. This is to cater for a scenario where one of the Acme Pty Ltd Opportunity needs to use Standard Pricebook. So, when this checkbox is checked for this particular Opportunity, the user can then choose any other pricebooks.

Sample Validation rule will look like: NOT(ISBLANK(Account.Price_Book__c)) && NOT(ISBLANK(Pricebook2Id))  && Ignore_Account_Pricebook__Checkbox__c == FALSE && Pricebook2Id <> Account.Price_Book__c

Form Assembly E-Signature

Form Assembly now allows you to capture e-signature. So how can we capture and store the signature image in Salesforce?

The sample scenario used in this article is to capture the signature image and store in Salesforce as attachment.

Connector setup:

After enabling e-signature in Form Assembly, you will need to setup the connector in Form Assembly. For example:
esignature as attachment

The form will automatically attach the image to Salesforce when %%ESIG_SIGNATURE_IMG%% is mapped to body. For more aliases, refer to the documentation here –

  • You need to  specify an extension in the File Name mapping, ie: Signature.png. If this is not done, the image will not have an extension when it is downloaded from Salesforce.
  • You won’t be able to see the actual image inside Salesforce, as it will send it as an attachment or download link.

Salesforce: Setting Private User Access Consideration

When an organisation has multiple branches where different user channel can access Salesforce, it’s only common the sharing settings for User is set to private. This will help to prevent a user from viewing another user.

However, there is one setting that needs to be considered when making user access private – Group tasks. This feature in enabled by default in Salesforce to allow assigning tasks to groups – role and subordinates/public groups as shown below.


Disabling this feature helps mask and not expose the list of roles to the users. Simply navigate to Setup > Activities Setting > (uncheck group tasks) to turn off this feature.


Imagine if you are providing support with different level of subscriptions and would like to have different priority given to different level of support.
ie: Gold Member Subscription will have higher priority over Silver Member Subscription.
Prioritising Email to Case Routing
By using Email to Case routing, you will be able to receive cases from different subscriber with different priority set. For example:

  • Email from needs to have a high priority
  • Email from needs to have a medium priority
  • Email from needs to have a low priority

Below image is where you can set the Case priority coming from different email address. servlet.FileDownload  Once routing is set up, support sent to different email address will automatically have priority populated and Support engineers can work on the Cases accordingly.

Salesforce Apex: Namespace and Field Name in AggregateResult

In Salesforce SOQL, we can use the aggregate function to summarize data in query. When an aggregate function is used, Salesforce will return the result as AggregateResult object and we can retrieve the value by calling AggregateResult.get(‘field name’). For example:

for(AggregateResult ar : [select count(Id), Business_Type__c from Account group by Business_Type__c]){
	system.debug(ar.get('expr0'));		//get the value of count(id)
	system.debug(ar.get('Business_Type__c'));	//get the grouped by field value

However, things get a little bit tricky when you have a namespace in the Salesforce instance and you have custom field in the SOQL. The sample query will still work, but you will get an error saying “Invalid aggregate result field” when you are trying to retrive the value of custom field.

To overcome this, you can choose to:

Option 1

Prepend the custom field with a namespace, for instance,

system.debug(ar.get('namespace__Business_Type__c'));	//get the grouped by field value

Option 2

Use alias in the SOQL to represent a custom field in query result.

for(AggregateResult ar : [select count(Id), Business_Type__c businesstype from Account group by Business_Type__c]){
	system.debug(ar.get('businesstype'));	//get the grouped by field value

Personally, I would prefer to use Option 2 as I don’t have to hard code the namespace in all the SOQL.

Salesforce: Edit data from list view

If you are looking for a way to edit your records in one view, you can consider using the Salesforce out of the box inline editing feature in list view.

Setting up:

To set this feature up, you will need to check the Enable Inline Editing checbox in User Interface. (Setup | Customise | User Interface)

This feature only allows you to edit one record at a time. If you need to  edit multiple records at a time, you can try below method.

Mass Edit from Related List

To enable mass edit from list view, you can do so by enabling the permission in user profile. However, do note that multiple edit from list is NOT SUPPORTED in Product object. You can only do inline editing for Products.Mass edit in list view

Wedid: Boomi Atom Installation and Processes Transfer


Customer has been using the Boomi Atom Cloud to run their integration processes and would like to shift to an on-premise atom to have better control over the atom configuration.

Customer would have difficulty transferring all the processes into the new production environment as well when the on-premise atom is available.


  • Installed a 64-bit on-premise atom hosted in Linux server
  • Assisted in transferring existing processes into the new production environment
  • Updated the environment extension as well as redefine the integration schedule
Purpose Install on-premise atom and transfer the existing integration process to ensure all processes utilises the on-premise atom instead
Tool Boomi
Complexity Low