myb-p-timestamp-fieldlisted
Install: claude install-skill AviMYB/mybusiness-plugins
# Timestamp Field / שדה חותמת זמן
Automatically record when a field is set or changed by creating a Date field + trigger with `onSetFields`.
## What You Need From the User
1. **Table** — e.g., Sales, Cases, Tasks
2. **Field to monitor** — e.g., OwnerId, SaleStatusId
3. **Every change or first time only?** — default: every change (`oneachupdate: true`)
## Steps
### 1. Get-Schema — verify the monitored field exists and no timestamp field already exists
### 2. Add-Field-to-Table — add a Date field
```
Add-Field-to-Table(table: "<Table>", fields: [{ name: "<Field>SetDate", type: "Date", label: "<Hebrew>" }])
```
### 3. Set-Trigger — create the trigger
```
Set-Trigger(
tableName: "<Table>", type: "data change", active: true,
name: "<descriptive Hebrew name>",
events: ["create", "update"],
oneachupdate: true,
onSetFields: ["<MonitoredField>"]
)
```
- `events: ["create", "update"]` catches both creation-with-value and later changes
- `oneachupdate: false` for one-time-only timestamps (e.g., lead conversion date)
- Save the trigger `_id` from the response
### 4. Set-Trigger-Action — add the update action
```
Set-Trigger-Action(
tableName: "<Table>", triggerId: "<id>", triggerType: "data change",
actionType: "update-object",
actionData: {
"update-object": {
"targetClass": "<Table>",
"connection": "current.objectId",
"fieldsValue": [{
"field": "<TimestampField>",
"typ