Create or update dimension
BetaChanges data
Creates a Twinfield customer, supplier, account, cost centre or project, or updates it.
Settings
| Setting | What it is |
|---|---|
| ConnectionRequired | The Twinfield connection the step signs in with. |
| Company code | Leave empty to use the company code on the connection. |
| Kind | Which master-data book this record lives in. |
| CodeRequired | The record's own Twinfield code. An existing code updates that record; a new one creates it. |
| Name | text |
| Short name | text |
| Website | text |
| Financial settings | The <financials> block, one Twinfield element per row. Empty rows are left out. |
| Addresses (JSON) | A list of addresses. A key starting with @ becomes an attribute, so an address carries its id, type and default flag — for example [{"@id":"1","@type":"invoice","@default":"true","name":"Acme","city":"Amsterdam"}] |
| Bank accounts (JSON) | A list of bank accounts, written the same way — for example [{"@default":"true","ascription":"Acme","iban":"NL91ABNA0417164300"}] |
| Group | The dimension group this record belongs to. |
| Extra XML | Twinfield's dimension document has more branches than this form shows; anything you write here goes in as written, inside <dimension> — for example <creditmanagement><basecreditlimit>5000</basecreditlimit></creditmanagement>. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `twinfield`) |
office | text |
dimtype | "DEB" or "CRD" or "BAS" or "PNL" or "KPL" or "PRJ", by default "DEB" |
code | text |
name | text |
shortName | text |
website | text |
financials | object of text, by default {} |
addresses | text |
banks | text |
groups | text |
extraXml | text |
Output
| Field | Type |
|---|---|
dimension | object |
code | string |
name | string |
status | string |
Sample output, and the expression for each field
- code"1000"
- dimension
- code"1000"
- name"Acme"
- result"1"
- status"active"
- name"Acme"
- status"active"
Errors
When a step of this node stops a run, the run page shows a code. Look it up:
Example step
The step as a flow file holds it. Replace each value in <…>.
{
"config": {
"addresses": "",
"banks": "",
"code": "<code>",
"connection": "<connection id>",
"dimtype": "DEB",
"extraXml": "",
"financials": {},
"groups": "",
"name": "",
"office": "",
"shortName": "",
"website": ""
},
"label": "Create or update dimension",
"type": "twinfield.upsertDimension",
"version": 1
}