Category Archives: Company Update

Salesforce: Lookup Filter for Different Record Type

Scenario: How to limit a lookup field to only show certain records based on record type. For example, account has 2 record type – HQ & Branch. Each branch will need to specify the HQ using the Parent Account field:

HQ (Parent Account)
Branch 1
Branch 2
Branch 3

Based on the example above, we need to apply below restriction:

  • A Branch account can not have another branch account as parent.
  • A HQ account can not have branch as parent acount.

Solution #1: Lookup filter (Recommended)

You can use lookup filter to limit the selection based on record type. For example:

Filter criteria:
  1. Account record type = Branch
  2. Parent account record type = HQ
  3. Account record type = HQ
  4. Parent account record type = HQ
Filter logic:
(1 AND 2) OR (3 AND 4)Note!: Make sure that filter type is set to Required to make sure that the lookup value MUST match criteria!

Solution #2: Validation

You can also choose to create a set of validation rule to stop user upon saving a record. For example:

AND(RecordType = Branch, NOT(ParentAccount.RecordType = HQ)),
AND(RecordType = HQ, NOT(ParentAccount.RecordType = HQ))

Both solution above will trigger on bulk insert/update. You will probably get below error when you try to assign parent account that doesnt fit the criteria:

  1. ERROR: Value does not exist or does not match filter criteria  OR
  2. The error message you set in the validation rule

Form Assembly: Email Notification


  1. How to setup email notification?
  2. How to customise it?
  3. If an attachment is submitted in a form, how to display the attachment in the email notification?

Question #1: How to setup email notification?

  1. Login to Form Assembly > Click on Form
  2. Go to the Notification tab on right panel
  3. Under ‘Your Notifications’ section, choose Enabled (text emai) to send text notification email or Enabled (HTML email) where the email content will be in HTML form.

Question #1: How to customise it?
If you would like to customise the email notification content, you can do so by selecting ‘Customized template’ under Email template selection after enabling email notification.

Note: You can play around with different aliases to display different information in email notification. For example, use %%RESPONSE%% to display all submitted data in the form. Do bear in mine that hidden fields will also be displayed in the email notification.

Question 3: If an attachment is submitted in a form, how to display the attachment in the email notification?
If your form allows attachment and the receipient would like to view the attachment in the email notification, you can do so by using below aliases:

  1. %%FILE_LIST%% = Displays URL link that directs to attachment record stored in Form Assembly. Login is required in order to view/download the file.
  2. %%UNPROTECTED_FILE_LIST%% = Automatically downloads file when the url link is clicked. Login is not required.

Salesforce: Migrating Middle Name

In the spring’15 release, Salesforce introduced Middle Name and Suffix under the Contact object to avoid confusion between two records with the same first name and last name. To turn on this feature, you will need to contact Salesforce support. Both fields also supports data import.

For further details, check out the release notes for Spring’15.

Problem: If you are trying to import data into middle name field but somehow the field is not showing in your data loader mapping list. What should you do?


  1. If you are using apex data loader, make sure that your data loader version is the latest. The field will not show in older version.
  2. Make sure that the field is available in Salesforce. If you are using Professional edition, make sure that it is displayed in the layout.
  3. If above method does not work, try using any 3rd party import tool. ie:


Salesforce: Disabling Feed-Based Layout

Salesforce allows us to create feed-based page layout on Leads, Account, Contact, Opportunity & custom objects. See this documentation for more information –

However, once feed-based page layout is enabled, you are no longer able to revert it back to the normal page layout view. However, You can try below workaround:


  1. Create a new page layout
  2. Choose existing page layout (the feed-based layout)
  3. Do not check the feed-based check box

Once new page layout is created, remember to assign the page layout to profiles & record types.

Enhancing Salesforce To Drive Company Success

Following on the heels of our highly successful product, RIO Readymade Inventory, we are pleased to announce our new Salesforce application, RIO DriveSuccess


Research has shown that companies with high performing recognition programs are 12 x more likely to have strong business outcomes.

Why RIO DriveSuccess ?

It’s a Salesforce application to facilitate measuring and acknowledging your achievers.

Take advantage of the global phenomenon of social media inside your business.

Have fun earning your success

Add fun to serious business outcomes, regardless of position or location.

Target results in the areas of productivity, loyalty, customer engagement, challenges, formal certification, practical skill development, project completion, team building or revenue.

Gamification applications such as RIO DriveSuccess engage people in an original way, fulfilling a critical desire within human beings ie the desire for recognition and rewards in exchange for their hard work and achievements.

How does it work?

  1. Install the package
  2. Define your business goals
  3. Measure progress against the goals
  4. Reward achievement through badges

Create healthy competition

Use Challenges to motivate and drive the team.

Challenges are:

  • A goal or set of goals you define
  • Are easily set up for individuals or a team
  • Team members can be involved in as many challenges as you want

Share success through Chatter

Celebrate as Chatter notifies users when they receive an endorsement.

Hall of Fame

Use the Hall of Fame to motivate and recognise success.

Build on Salesforce features

Utilise Salesforce workflows to automatically trigger endorsements.

Motivate your Partner Community as well as Salesforce platform users.

Want a demo? Send us an email on

Wedid: Salesforce As Retail Coordination System


A consultancy company needs to provide solution to the customer encompassing a portfolio of the retail information relating to the property, budgeting, landlord, solicitor etc. The challenges identified in the solution are:

  • each detailed information need to be linked to create a connected entity as documents need to be generated at each record level containing the summarised entities
  • all steps need to be tracked in each of the leasing opportunities to capture the offer/counter offer stages
  • elaborate documents need to be generated



All retail entity is tracked and managed from the objects in the diagram to create a linkage.  Precise data modelling is required. When documents are generated, retrieving information for each entity will not be an issue.

Each offer stage will be tracked individually. Once a final offer is decided, a trigger is implemented to roll up the final result to the opportunity.

Related Objects Account
Associated Entity (Custom)
Account Site (Custom)
Site (Custom)
Offer (Custom)
Components Data Modelling
Salesforce Apex
Conga Composer
Complexity Medium

Deploying Salesforce Process Builder

You may have developed process builder to streamline your business processes in sandbox and you may want to deploy them into production instances.

Do not panic if you are not seeing the component “Process Builder” or any similar term in the change set you are creating. They are actually grouped together with flows and its part of the component type “Flow Definition”.


Once, the processes are deployed to production just double check if the processes are still active and if it not, activate it if you would like to start use them in your production.

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.