BriefcaseDefinition defines which records are available to assigned users and groups for offline viewing in the Salesforce Field Service mobile app for iOS and Android. Its rules select records from objects and can include related records. Briefcase objects are available in orgs with Briefcase Builder and Field Service enabled.
A briefcase's selection rules define the data scope, not the recipients. Determining who receives the offline data also requires the current user and group assignments. BriefcaseRule and BriefcaseRuleFilter are nested parts of the definition, not separate deployable components.
Key Elements
The table includes fields on the definition and its nested rules and filters.
| Element | What the Element Controls |
|---|---|
isActive |
Required. true activates the briefcase and makes selected records available to assignees; false makes it inactive. |
type |
Applies where multiple briefcase types are available. Values are Standard, HighVolume, and MobileAppSync, with different offline priming roles. |
briefcaseRules, relatedRules
|
briefcaseRules contains top-level selection rules. Each rule can recursively include related records through relatedRules. |
targetEntity |
Required on each rule. The API name of the standard object, custom object, or custom metadata type whose records the rule selects. Custom metadata types have additional restrictions. |
relationshipField |
Required on related rules. Identifies the object field linking the nested rule to its containing rule. |
relationshipType |
Required on related rules. ParentToChild or ChildToParent determines the direction of relationship traversal. |
queryScope |
Restricts the rule's record scope. The briefcase-specific documented values are Everything, AssignedToMe, and Mine. AssignedToMe is supported only for ServiceAppointment. |
recordLimit |
Limits records returned by a rule. The documented maximum is 50,000 matching records per rule, subject also to the 50,000-record maximum across active briefcases. |
orderBy, isAscendingOrder
|
Select the sorting field and direction. true means ascending; false means descending. Sorting determines which records are returned when matches exceed the rule's limit. |
briefcaseRuleFilters |
Contains the rule's filter criteria. Including any filter requires filterLogic. |
filterLogic, filterSeqNumber
|
Combine filters using their sequential numbers and AND or OR, such as 1 AND 2. Each filter requires a sequence number. |
filterOperator |
Required on each filter. Values are d (ends with), e (equals), g (greater than), h (greater than or equal), l (less than), m (less than or equal), n (not equals), and s (starts with). n applies only when filterValue is empty. |
filterValue |
Supplies the comparison value. Supports uppercase date literals, $User.Id for user-ID fields, and blank values for empty or not-empty checks. |
targetEntityField |
Required on each filter. The API name of a field on the rule's targetEntity. Compound fields are not supported. |
isRelatedFilesRule |
Marks rules used for offline file-attachment priming. Available only for the Offline App (Salesforce Mobile App Plus). Once set, its value cannot be changed for the life of the rule. |
Behavior and Constraints
Activation, assignments, and briefcase type
Activating a briefcase makes its selected records available to assignees. Setting isActive does not identify those assignees, and the rule tree alone cannot establish which users receive the data.
Where multiple briefcase types are available, type distinguishes how records are primed, or prepared for offline use:
-
Standard: A standard briefcase that can be used with priming APIs. -
HighVolume: An increased-capacity briefcase used with performance priming in the Field Service mobile app. -
MobileAppSync: An automatically generated briefcase used for performance priming in the Field Service mobile app.
Selection scope and record limits
Each rule selects records from its targetEntity. Nested rules select related records according to both their position in the rule tree and their relationshipType. The relationshipField identifies the field linking each nested rule to its containing rule.
recordLimit is not an independent allowance for every rule. A rule can return at most 50,000 matching records, and its returned records must also fit within the maximum of 50,000 records across active briefcases. When too many records match, orderBy and isAscendingOrder affect offline coverage, not just display order. Although HighVolume is described as increased capacity, the recordLimit documentation does not specify a different numeric limit by briefcase type.
The shared FilterScope enumeration exposes more values than the briefcase-specific list. That enumeration alone does not establish support for additional values in briefcase rules. The documented briefcase values are Everything, AssignedToMe, and Mine, with AssignedToMe restricted to ServiceAppointment.
Custom metadata type rules
A custom metadata type can be a targetEntity only in a top-level rule. That rule cannot contain any field other than targetEntity, so it cannot include filters, limits, or related rules. A briefcase can contain only one rule for the same custom metadata type.
Filter interpretation
Any rule with a briefcaseRuleFilters entry must include filterLogic, even if it has only one filter. Filters use sequential filterSeqNumber values beginning with 1; the logic expression refers to those numbers.
- Date literals in
filterValuemust be uppercase, such asTODAY,YESTERDAY, andTOMORROW. - For fields that accept a user ID, such as
OwnerIdorCreatedById,$User.Idsupplies the ID of the user making the request. - A blank
filterValuewithfilterOperatorset toetests whether the field is empty. A blank value withntests whether it is not empty. Thenoperator is documented only for an emptyfilterValue. - Compound fields cannot be used as
targetEntityField. - Deterministically encrypted fields support equals and not-equals filtering, subject to the restriction on
nand an empty comparison value.
Offline file attachments
File-attachment priming through isRelatedFilesRule is available only for the Offline App (Salesforce Mobile App Plus). It requires four rule levels: the object with attachments, followed by ContentDocumentLink, ContentDocument, and ContentVersion.
The documented WorkOrder pattern uses these relationships:
- A top-level rule selects
WorkOrderrecords. - A nested
ContentDocumentLinkrule usesrelationshipField=LinkedEntityIdandrelationshipType=ParentToChild. - A nested
ContentDocumentrule usesrelationshipField=ContentDocumentIdandrelationshipType=ChildToParent. - A nested
ContentVersionrule usesrelationshipField=ContentDocumentIdandrelationshipType=ParentToChild.
All three file-related rules must set isRelatedFilesRule to true, specify recordLimit, and use the same limit value to control the number of attachments returned. Optional file-size and file-type filters can be configured through Briefcase Builder in Setup.
Deployment and Retrieval
BriefcaseDefinition components use the .briefcaseDefinition suffix and reside in the briefcaseDefinitions folder. The type supports the * wildcard in the package.xml manifest.
The definition inherits fullName from Metadata. Its required masterLabel supplies the briefcase name displayed in the Salesforce user interface; isActive is also required. Rules and filters are included within the component rather than retrieved or deployed as separate metadata types.
When preparing a definition for deployment, account for these configuration constraints:
- Every related rule requires both
relationshipFieldandrelationshipType. - Every rule containing a filter requires
filterLogic, including a rule with only one filter. - A custom metadata type rule must be top-level, contain only
targetEntity, and not duplicate another rule for that same custom metadata type. - Object and field names throughout the nested rules are references. Deploying a briefcase does not define those objects or fields.
File-attachment rules have additional lifecycle restrictions. Once any value has been set for isRelatedFilesRule, that value cannot be changed for the life of the rule. To remove the attachment configuration, delete the ContentDocumentLink rule and all its nested rules together. A single rule within the ContentDocumentLink, ContentDocument, and ContentVersion hierarchy cannot be deleted independently.
Relationships
Object and field references can occur at every level of the rule tree. They associate the briefcase with metadata definitions where applicable; they do not contain those definitions. A change to a referenced field can alter filtering, which records survive a limit, or relationship traversal even when the top-level targetEntity stays the same.
References
-
CustomObject:targetEntity. -
CustomField:orderBy,relationshipField,targetEntityField.
Reported Issues
- Apex was reported as an option for querying the same-named
BriefcaseDefinitionobject. A 2021 community answer listed it among objects defined in both the SOAP and Tooling APIs that could be queried in Apex. This report concerns object query access, not retrieval of the metadata definition or its nested rule XML. See the Apex queryability discussion.
Common Questions
Why are records missing from an active briefcase?
Activation makes selected records available to assignees, so check the current user and group assignments as well as the rules. Filters, queryScope, related-rule traversal, and record limits determine the selected data. If matches exceed a rule's limit, its sort field and direction determine which records are returned.
Does HighVolume increase the 50,000-record limit?
HighVolume is described as an increased-capacity type for performance priming, but the recordLimit documentation does not provide a different numeric limit for it. The documented rule maximum and maximum across active briefcases are both 50,000 records.
Can a briefcase include custom metadata records?
Yes. Use the custom metadata type's API name as targetEntity in a top-level rule. That rule can contain no other fields, and the same custom metadata type can appear in only one rule in the briefcase.
Do I need filterLogic when there is only one filter?
Yes. Any rule containing a briefcaseRuleFilters entry must also include filterLogic. The expression refers to the filter's filterSeqNumber.
How do I remove offline file-attachment rules?
Delete the ContentDocumentLink rule and all its nested rules together. You cannot remove an individual rule from that attachment hierarchy, and you cannot change isRelatedFilesRule after its value has been set.