Skip to content

Work with configurations

To create a request to change the Document registration form, you must strictly follow the JSON syntax used in the request.

You need a new request to send the delta with changes to WorkZone 365.

  1. Set method to POST.
  2. Specify the URL to OData in the following format: OData address + OData/WzсConfigurations.
  3. Go to the Body tab.
  4. Select raw.
  5. Select JSON.
  6. Enter the request in the JSON format. See The structure of requests.
  7. Click Send.

You can add a custom field to the Document registration form. To do this, you must create a new component request and send it to the configuration file.

  1. Compose a custom component by using available properties. See Common properties. Remember to follow JSON syntax.
  2. Set the property for the new component as \"visible\":\"Visible\" and send it. See Create a new request.

To delete a configuration from the database, proceed with the following steps:

  1. Select the DELETE method.
  2. Enter a URL to OData and add the configuration ID in the database.

    htts://<host>/OData/WzcConfigurations('50').

    See how to find the ID configuration below.
  3. Click Send.
  1. Go to the Query Builder.
  2. Select WzcConfigurations in the Entity field.
  3. Optionally, use Filter to show configurations of the specific unit or user.
  4. Click Search.
  5. Find the ID of the needed configuration.

To reset a configuration to default, delete all configurations.

{"Config":
"{\"forms\":
{\"Document\":
{\"components\":
{
\"Title\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":true,\"order\":1},
\"DocumentType\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":true,\"order\":2},
\"Classification\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":true,\"order\":3},
\"State\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":true,\"order\":4},
\"CaseHandler\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":false,\"order\":5},
\"ResponsibleUnit\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":6},
\"DocumentGroup\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":7},
\"MailList\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":8},
\"Text\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":9},
\"CreatedBy\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":10},
\"CreatedDate\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":11},
\"VersionNumber\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":12},
\"Type\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":13},
\"DocumentNumber\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":14},
\"Origin\":{\"defaultValue\":\"CAP\",\"visible\":\"Visible\",\"readOnly\":false,\"required\":false,\"order\":15},
\"RetentionDate\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":16},
\"ArchivingForm\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":17},
\"PostalDate\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":18},
\"SentFrom\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":19},
\"Replied\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":20},
\"LetterDate\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":21},
\"ActingUnit\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":22},
\"Case\":{\"visible\":\"None\",\"readOnly\":true,\"required\":false,\"order\":23},
\"MainDocument\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":24},
\"ReplyDeadline\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":25},
\"Keywords\":{\"visible\":\"None\",\"readOnly\":false,\"required\":false,\"order\":26}
}
}
}
}",
"Priority": "7",
"Client":"WZO",
"NameKey_Value":"158"}

Set ‘Document state’ as read-only field and define its default value

Section titled “Set ‘Document state’ as read-only field and define its default value”
\"State\":{\"readOnly\":true, \"defaultValue\":\"UÅ, Draft\",\"visible\":\"Visible\",\"required\":true,\"order\":3}

Set ‘Document type’ as an optional field and ‘Text’ as a required field

Section titled “Set ‘Document type’ as an optional field and ‘Text’ as a required field”
\"DocumentType\":{\"required\":false,\"order\":2,\"visible\":\"Visible\",\"readOnly\":false},
\"Text\":{\"required\":true,\"order\":9,\"visible\":\"Visible\",\"readOnly\":false}
\"TextField_Value\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":false,\"order\":9},
\"DateField_Value\":{\"visible\":\"Visible\",\"readOnly\":false,\"required\":true,\"order\":10}

The code related to the custom document fields is modified according to the following rules:

RuleExample
The first letter of every word in the field code is capitalized."textCode" > "TextCode"
The underscore and space symbols "_", " " are deleted from the field code."Text_field" > "TextField"

"Text field" > "TextField"
The "_Value" part is added after the field code."TextField" > "TextField_Value"
All uppercase letters except the first one are lower-cased."CVR Number" > "CvrNumber_Value"