Retrieves the value of an object’s field according to the value of another field. Relevant for Field Service objects only. For example, returns the ID of a Scheduling Policy according to a specific policy’s name.
This action is available in API version 65.0 and later.
Supported REST HTTP Methods
URI: /services/data/vXX.X/actions/standard/getFieldServiceObjectProperty
Where XX.X is the latest API version.
Formats: JSON, XML
HTTP Methods: POST
Authentication: Authorization: Bearer TOKEN
Where TOKEN is a variable.
Inputs
| Input | Type | Description |
|---|---|---|
objectName |
string | Required. The developer name of the Field Service object. For example, SchedulingPolicy. |
fieldName |
string | Required. The name of the object’s field used to find the relevant object. For example Name. |
fieldValue |
string | Required. The value of the specific field used to find the relevant object. For example, Customer First. |
fieldToReturn |
string | Required. The name of the field whose value you want to return. For example, Id. |
isCustomObject |
boolean | Required. Indicates whether the object is a custom object (true) or a standard object (false). |
Outputs
| Output | Type | Description |
|---|---|---|
fieldServiceStandardVariable |
string | Returns the value of an object’s field as an Apex object, which contains a textValue, integerValue, or booleanValue. |
Example
Sample request body:
{
"inputs" : [{
"objectName" : "SchedulingPolicy",
"fieldName" : "Name",
"fieldValue" : "Customer First",
"fieldToReturn" : "Id",
"isCustomObject" : false
}]
}
Sample response body:
{
"actionName" : "getFieldServiceObjectProperty",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"fieldServiceStandardVariable" : {
"textValue" : "0Vr000000000001AAA",
"integerValue" : null,
"booleanValue" : null
}
}
}