---
schema_version: "1"
id: f5c59aa159f3b31a18bb8dfc3a32b475f4a03a7df6deb36be8fd5d91f9b515e3
title: GeolocationBasedAction
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_geolocationbasedaction.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_geolocationbasedaction.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5f5882e54bdf80e1dab18d14ea8e40c9c09b2745cddc625a16be0a76e4a53541
description: Represents a geolocation-based action, which is an action that’s triggered when a user enters, exits, or is within the area of the associated object. Available in API version 61.0 and later.
---
# GeolocationBasedAction

Represents a geolocation-based action, which is an action that’s triggered when a user enters, exits, or is within the area of the associated object. Available in API version 61.0 and later.

## Supported Calls

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

## Special Access Rules

Field Service must be enabled.

## Fields

| Field | Details |
| --- | --- |
| ActionData | 
Type

textarea

Properties

Create, Nillable, Update

Description

The details of the selected action type.



 |
| ActionType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

The type of action.

Possible values are:

- PlatformAlert
- QuickAction
- ViewRecord





 |
| Description | 

Type

textarea

Properties

Create, Nillable, Update

Description

The description of the action.



 |
| InitialTimeInvoked | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Captures the first time the mobile worker invoked this action.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp when the current user last accessed this record indirectly, for example, through a list view or related record.



 |
| LastTimeInvoked | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Captures the last time the mobile worker invoked this action.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp when the current user last viewed this record or list view. If this value is null, and LastReferenceDate isn’t null, the user accessed this record or list view indirectly.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The name of the action.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

ID of the owner of this object.

This field is a polymorphic relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

Group, User



 |
| Radius | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The distance in meters from the location of the associated object that triggers the action.



 |
| ReferenceRecordId | 

Type

reference

Properties

Create, Filter, Group, Sort, Update

Description

The ID of the record that the action is associated with.

This field is a relationship field.

Relationship Name

ReferenceRecord

Relationship Type

Lookup

Refers To

ServiceAppointment



 |
| TriggerType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

The event that triggered this action.

Possible values are:

- GeoFenceEnter—Enter
- GeoFenceExit—Exit





 |

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[GeolocationBasedActionChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.")

Change events are available for the object.