Changes data

quotecloud_update_custom_data_definition

Change a company-wide custom data item definition: its label, type, default value, mandatory flag or options. Only the supplied fields change. Renaming is dangerous and requires confirmation: a call carrying label is answered with status confirmation_required, a preview that says how many templates and documents use the item, and a one-time confirmToken; re-send the identical arguments with that confirmToken to apply. A rename does not propagate: documents and templates that already hold the item keep the label they were created with, exactly as a rename on the settings page does. Changing the other fields applies immediately. Writes company settings, requires customData:write, only runs when customData.manage is enabled, and needs the company owner or manageCompanySettings. Refuses definitions scoped to one document and deleted definitions.

Inputs

dataItemIdRequired
The QC_dataItems id reported by quotecloud_list_custom_data_definitions. string
labelOptional
The new label. Supplying it makes the call a rename, which needs confirmation. string
typeOptional
string, number, currency, date (YYYY-MM-DD), dateTime (YYYY-MM-DDTHH:MM), boolean, select (one option), multiselect (several options) or check (a tick box). one of: string, number, date, dateTime, boolean, currency, select, multiselect, check
defaultValueOptional
The default new documents start with, in the item’s own type. A date may also be currentDate, days:N (N days after creation) or none. value
mandatoryOptional
boolean
optionsOptional
The option list for a select, multiselect or check item. Not allowed for other types. list of string
confirmTokenOptional
One-time code from the preview. Send it with otherwise identical inputs to run the change. string