On a Salesforce booking request or shift, choose the Account first to narrow the Job, Site and Cost Center lists. Choose the Site before the Site Location and the Job before the Rate Group. On a Working Pattern (placement), start with the Job and Site.
| Lookup | Where it applies | Matching records |
|---|---|---|
| Job, Site, Cost Center | Booking Request and Shift | Records owned by the selected Account or any of its direct children. A blank Account leaves these lists unrestricted by account. |
| Site Location | Booking Request, Shift and Working Pattern | Locations belonging to the selected Site. |
| Rate Group | Booking Request, Shift and Working Pattern | Rate groups for the selected Job and rate groups with a blank Job. |
| Working Pattern Type | Booking Request | A type with a matching Job, Site, Site Location or Account, or a global type. The Account match uses the request's own Account. |
| Working Pattern Type | Working Pattern | A type with a matching Job, Site or Site Location, or a global type. |
For example, if a trust owns the jobs and cost centers and each school owns its site, select the trust as the booking request's Account. You can then choose a trust job, a trust cost center and a school site. Selecting the school as the request's Account searches the school and its own direct children.
To inspect a filter, open Setup > Object Manager, select the object, then open the lookup under Fields & Relationships. WFM defines these filters as optional, including the Shift Site Location filter in 12.13.0. In Salesforce Classic, users can expand an optional lookup to all results. In Lightning Experience, any value you select must match the filter. Salesforce reserves edits to a managed field's lookup filter for the package developer. Salesforce lookup filter behaviour and Salesforce managed field properties
On the packaged Account page, open Pay & Bill > Working Pattern Types and select New to create a template with the Account filled in. To assign an existing template, open the Working Pattern Type and set Account (b3s__Account__c). The All list view shows the Account for each type. In the lookup results you can also check the Job, Site and Site Location.
The Global checkbox (b3s__Is_Global__c) is calculated. It is selected when One Off is clear and Account, Job, Site and Site Location are all blank.
The Client Shift Manager uses its own patternTypes loader. The 12.13.0 sample offers reusable patterns with a blank Account, patterns assigned to an account the contact acts for and patterns assigned to a direct parent of one of those accounts. It excludes one-off schedules. With Manage Pattern Types, a client can use New Pattern Type to save a template to an eligible account. If several accounts qualify within the current selection, the client chooses one in the dialog.
b3s__Loaders__c), find patternTypes. Replace its filterRecordsBy array with the three clauses shown below and add b3s__Account__c to fieldToLoad. If your portal uses additional restrictions, apply them to each clause. Keep any extra fields your forms use. Package upgrades preserve your configuration.{
"name": "patternTypes",
"objectName": "b3s__Working_Pattern_Type__c",
"filterRecordsBy": [
"b3s__One_Off__c = false AND b3s__Account__c = null",
"b3s__One_Off__c = false AND b3s__Account__c IN :accountIds",
"b3s__One_Off__c = false AND b3s__Account__c IN (SELECT ParentId FROM Account WHERE Id IN :accountIds) AND b3s__Account__c NOT IN :accountIds"
],
"groupRecordsBy": "Id",
"fieldToLoad": ["Name", "b3s__Account__c", "b3s__Work_Job__c", "b3s__Work_Site__c"]
}