"days_to_close" is a read only property; its value cannot be set
resolver
Hey, @dan9👋 You are not missing anything. Properties marked read-only cannot be modified. By making a request to the Properties API, we can get more details.
In this case, “days_to_close” is a calculation property. Calculation properties are built from two or more properties. This is why you cannot edit the property. You may be able to edit one of the properties that make up the calculation, but not the calculation property itself — e.g. “closedate” or “createdate”.
HTTP 200
{
"updatedAt": "2022-05-27T23:45:00.102Z",
"createdAt": "2019-08-06T02:41:52.984Z",
"name": "days_to_close",
"label": "Days to close",
"type": "number",
"fieldType": "calculation_equation",
"description": "The number of days the deal took to close",
"groupName": "dealinformation",
"options": [],
"displayOrder": -1,
"calculated": false,
"externalOptions": true,
"hasUniqueValue": false,
"hidden": true,
"hubspotDefined": true,
"showCurrencySymbol": false,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": true,
"readOnlyValue": true
},
"formField": false,
"calculationFormula": "max(0, round_down(((closedate - createdate) / 86400000), 0))"
}
If you need to edit a property like Days to Close, you'll need to consider creating a custom property and using a date picker or single line text field-type. As there is not a method to get around the read-only flag for properties.
"days_to_close" is a read only property; its value cannot be set
resolver
Hey, @dan9👋 You are not missing anything. Properties marked read-only cannot be modified. By making a request to the Properties API, we can get more details.
In this case, “days_to_close” is a calculation property. Calculation properties are built from two or more properties. This is why you cannot edit the property. You may be able to edit one of the properties that make up the calculation, but not the calculation property itself — e.g. “closedate” or “createdate”.
HTTP 200
{
"updatedAt": "2022-05-27T23:45:00.102Z",
"createdAt": "2019-08-06T02:41:52.984Z",
"name": "days_to_close",
"label": "Days to close",
"type": "number",
"fieldType": "calculation_equation",
"description": "The number of days the deal took to close",
"groupName": "dealinformation",
"options": [],
"displayOrder": -1,
"calculated": false,
"externalOptions": true,
"hasUniqueValue": false,
"hidden": true,
"hubspotDefined": true,
"showCurrencySymbol": false,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": true,
"readOnlyValue": true
},
"formField": false,
"calculationFormula": "max(0, round_down(((closedate - createdate) / 86400000), 0))"
}
If you need to edit a property like Days to Close, you'll need to consider creating a custom property and using a date picker or single line text field-type. As there is not a method to get around the read-only flag for properties.