APIs & Integrations

JosephWa
Participant

can not create custom object with booleancheckbox

hello,

trying to add fieldType booleancheckbox to a custom object.

when specifying type: bool. I get the error :

Invalid input JSON on line 43, column 17: Cannot deserialize value of type `com.hubspot.crmpublic.core.models.schemas.properties.Type` from String \"bool\": value not one of declared Enum instance names: [number, datetime, date, enumeration, string]
 
when specifying other data types like "number" I get the error :
"Unexpected property type 'number', expected one of: [bool, enumeration]"
so I need to use bool but then I can not?
2 Replies 2
JosephWa
Participant

can not create custom object with booleancheckbox

in a properties array I used one like this :

{
        "name":"is_expired",
        "label":"is expired",
        "groupName":"my_group",
         "type": "bool",    
      "fieldType": "booleancheckbox",
     
  }

 but it produces errors.

in the end, the only thing that worked for me was using enum like this :

{
        "name":"is_expired",
        "label":"is expired",
        "groupName":"my_group",
         "type": "enumeration",    
      "fieldType": "booleancheckbox",
      "options": [
                {
                    "label": "True",
                    "value": "true",
                    "description": "",
                    "displayOrder": 0,
                    "hidden": false
                },
                {
                    "label": "False",
                    "value": "false",
                    "description": "",
                    "displayOrder": 1,
                    "hidden": false
                }
            ]
    }

I have not tried it again since my post.

dennisedson
HubSpot Product Team
HubSpot Product Team

can not create custom object with booleancheckbox

Hey @JosephWa ,

Apologies for delayed response! 

Are you still having an issue?  If so, could you add the request body that you are sending

Any code examples you have would be greatly appreciated!

Also, if you did solve it, please post your solution

 

Thanks!

0 Upvotes