FlowmageDocs

Create or update dimension

BetaChanges data

Creates a Twinfield customer, supplier, account, cost centre or project, or updates it.

Settings

SettingWhat it is
ConnectionRequiredThe Twinfield connection the step signs in with.
Company codeLeave empty to use the company code on the connection.
KindWhich master-data book this record lives in.
CodeRequiredThe record's own Twinfield code. An existing code updates that record; a new one creates it.
Nametext
Short nametext
Websitetext
Financial settingsThe <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"}]
GroupThe dimension group this record belongs to.
Extra XMLTwinfield'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
KeyValue
connectiontexta connection id from `requires.connections` (provider `twinfield`)
officetext
dimtype"DEB" or "CRD" or "BAS" or "PNL" or "KPL" or "PRJ", by default "DEB"
codetext
nametext
shortNametext
websitetext
financialsobject of text, by default {}
addressestext
bankstext
groupstext
extraXmltext

Output

FieldType
dimensionobject
codestring
namestring
statusstring
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
}