How to use SFDC Custom Objects associated with SFDC Accounts in Velocity Scripts | Community
Skip to main content
AmritTandon
Adobe Employee
Adobe Employee
February 14, 2023

How to use SFDC Custom Objects associated with SFDC Accounts in Velocity Scripts

  • February 14, 2023
  • 0 replies
  • 1839 views

Many would think, is it possible to use Account related custom objects in velocity scripting? Yes, it is provided it is created and lookup field is mapped correctly.

 

When the SFDC Custom Object (linked with a SFDC Account) is the child object where SFDC Account Object as a Parent, then only we can use the custom object data in Velocity Scripting.

 

Let me show an example:

 

  • Have the SFDC Admin create the custom object associated with an Account with a Lookup field to the Account Object
    1. This ensures the custom object is the child object and Account object is the Parent

Eg:

 

 

  • Create other fields on this custom object and save
  • Enter the data for this custom object
  • Ensure the Sync user has access to all the fields of this custom object as well as this object

Eg.

 

 

  • Sync the custom object with Marketo
    1. Refresh the schema
    2. Identify the newly created custom object
    3. Click Enable Sync
    4. Remember, you can sync any custom object upto 2-level deep
  • Once the data is synced, create a velocity script
    1. Sample Script:

 

  • Use this data in email personalization:

 

Custom Object value for that Account:

 

 

Please let me know if you have any questions as I am always happy to help!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.