Newer Version Available

This content describes an older version of this product. View Latest

Location

Represents a warehouse, service vehicle, work site, or other element of the region where your team performs field service work.

Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

Special Access Rules

Field Service Lightning must be enabled.

Fields

Field Name Details
CloseDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date the location closed or went out of service.
ConstructionEndDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date construction ended at the location.
ConstructionStartDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date construction began at the location.
Description
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A brief description of the location.
DrivingDirections
Type
string
Properties
Create, Filter, Nillable, Sort, Update
Description
Directions to the location.
IsInventoryLocation
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location stores parts.

This field must be selected if you want to associate the location with product items.

Note

IsMobile
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location moves. For example, a truck or tool box.
LastReferencedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the location was last modified. Its label in the user interface is Last Modified Date.
LastViewedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date the location was last viewed.
Latitude
Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The latitude of the location.
Location
Type
location
Properties
Nillable
Description
The geographic location.
LocationLevel
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The location’s position in a location hierarchy. If the location has no parent or child locations, its level is 1. Locations that belong to a hierarchy have a level of 1 for the root location, 2 for the child locations of the root location, 3 for their children, and so forth.
LocationType
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Picklist of location types. The values are:
  • Warehouse (default)
  • Site
  • Van
  • Plant
Longitude
Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The longitude of the location.
Name
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The name of the location. For example, Service Van #4.
OpenDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date the location opened or came into service.
OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The location’s owner or driver.
ParentLocationId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The location’s parent location. For example, if vans are stored at a warehouse when not in service, the warehouse is the parent location.
PossessionDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The date the location was purchased.
RemodelEndDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date remodel construction ended at the location.
RemodelStartDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date remodel construction ended at the location.
RootLocationId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
(Read Only) The top-level location in the location’s hierarchy.
TimeZone
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Picklist of available time zones.
VisitorAddressId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Lookup to an account’s or client’s address.

Usage

To track your inventory in Salesforce, create product items, which represent the stock of a particular product a particular location. For example, create a product item that represents the 500 bolts you have in stock at your Warehouse A location. Each product item must be associated with a location.

To get a more granular picture of your field service operation, associate locations with service territories. For example, if a warehouse is located in a particular service territory, add it as a service territory location.

“Location” in Salesforce can also refer to the geolocation compound field found on many standard objects. When referencing the Location object in your Apex code, always use Schema.Location instead of Location to prevent confusion with the standard Location compound field. If referencing both the Location object and the Location field in the same snippet, you can differentiate between the two by using System.Location for the field and Schema.Location for the object.

Important

Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

LocationFeed
Feed tracking is available for the object.
LocationHistory
History is available for tracked fields of the object.
LocationOwnerSharingRule
Sharing rules are available for the object.
LocationShare
Sharing is available for the object.