# \_apply

Applies an object version's data onto that object. (Currently only works with Form versions)

### Parameters

#### id

The ID of the version being applied to an object.

#### obj\_id

The ID of the object which is being modified.

#### obj\_type

The type of object being modified by this function, currently only Form objects.

### Example

```
FM_api('Undo_apply', [
    'id'=>'90002',
    'obj_id'=>'580335',
    'obj_type'=>'forms'
    ]
);
```

### Result

#### On Success

```
{"ok":1}
```

#### On Failure

If the "id" parameter is not set or has a value less than 1:

```
{"error":"missing or invalid parameter: id"}
```

If the "obj\_id" parameter is not set or has a value less than 1:

```
{"error":"missing or invalid parameter: obj_id"}
```

If "obj\_type" parameter is not set or does not have the value "forms":

```
{"error":"invalid obj_type"}
```

If a version is not found which fits the "id", "obj\_id" and "obj\_type" parameters:

```
{"error":"undo entry does not exist"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/undo/_apply.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
