APIs & Integrations

GVerma
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Delete one of the Required property from Schema

resolver

I created a custom object.  When I was making some changes in the custom object, I specified event, module as required properties in my patch API call. Now I want to delete event as the required property from my schema. However, I am unable to delete it.

I want to change its schema and have only one required property module.

 

"requiredProperties": [
"module",
"event"
]

 

0 Avaliação positiva
1 Solução aceita
dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Delete one of the Required property from Schema

resolver

@GVerma 

You should be able to send this:

{
    "requiredProperties": [
        "module"
    ]
}

Exibir solução no post original

3 Respostas 3
dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Delete one of the Required property from Schema

resolver

@GVerma 

You should be able to send this:

{
    "requiredProperties": [
        "module"
    ]
}
swise
Participante

Delete one of the Required property from Schema

resolver

This is not working for me. When I run the PATCH call with only a single required property it just added that property to my required properties, instead of replacing the old required property. I attempted the call again to see if with two required properties if I patched with just one if it would delete the other. It did not.

0 Avaliação positiva
MBergenhök
Participante | Parceiro
Participante | Parceiro

Delete one of the Required property from Schema

resolver

I had the same problem with the PATCH call just adding the new required property to the old. But then I discovered that I still had the old required property in the 

"searchableProperties" and as  "primaryDisplayProperty".  When I replaced the old property and tried again it worked fine.
 
This is what I did
regno = old required property
regnumber = new required property

NOT working:
Request
{
  "requiredProperties": [ "regnumber" ]
}
Response
{
 "requiredProperties": [ "regno", "regnumber" ]
}
 
Working:
Request
"requiredProperties": [ "regnumber" ],
"searchableProperties": [ "regnumber""modelname" ],
"primaryDisplayProperty": "regnumber"
}
 
Response
"requiredProperties": [
"regnumber"
],
"searchableProperties": [
"regnumber",
"modelname"
],
"primaryDisplayProperty": "regnumber"
0 Avaliação positiva