Query Patterns

1: Record Types #

An important feature of Salesforce is record types. In Sliced Bread you could just use the Record Type Id in your mappings, but that would be bad practice and doesn’t allow the recipe to travel easily. Instead you should use a query rule to find the Record Type Id by object name and developer name.

First create a Lookup virtual field to store the Record Type Id.

1: Create a Lookup virtual field to store the Record Type Id.

Then create a query rule that queries the Record Type by SObject Type and Record Type Name. You will find that the Recipe Builder already pre-renders most of this form.

1: Create a query rule that queries the Record Type

See screenshot below for an example of how the queried record type id can now be used in other rules.

1: Create a query rule that queries the Record Type

2: Fail slice if query has multiple results #

Copyright © 2024 all rights reserved, powered by Sliced Bread Software B.V.