Updating schema properties

Hey, I’m trying to update an existing schema for my custom objects.
I can’t find any examples or documentation about it, is it even possible?
I was able to update the labels and some other properties like searchable and required properties.
This is what I see at the type definition for the payload of this operation:

import { ObjectTypeDefinitionLabels } from './ObjectTypeDefinitionLabels';
export declare class ObjectTypeDefinitionPatch {
 'labels'?: ObjectTypeDefinitionLabels;
 'requiredProperties'?: Array<string>;
 'searchableProperties'?: Array<string>;
 'primaryDisplayProperty'?: string;
 'secondaryDisplayProperties'?: Array<string>;
 'restorable'?: boolean;
 static readonly discriminator: string | undefined;
 static readonly attributeTypeMap: Array<{
 name: string;
 baseName: string;
 type: string;
 format: string;
 }>;
 static getAttributeTypeMap(): {
 name: string;
 baseName: string;
 type: string;
 format: string;
 }[];
 constructor();
}

Hi @dino56,

On this documentation you can find code samples in various languages to make a PATCH request to the custom objects schema enpoint.

Hope this helps ! If it does, please consider marking this as a solution !

Have a good day,

Ludwig

Hey, thanks for the answer but as I mentioned I’m trying to update the properties in my schema.
I’ve read that documentation fully and I don’t see anything related to my question.
Can you be more specific? maybe I’m blind and I’m not seeing it.
In that screenshot you shared there’s nothing showing how to update the properties. Everything in the schema can be updated except the properties.

Hey,
My bad I read your post too quickly !
Indeed you won’t be able to edit your object properties using this endpoint.
Try using this one though : CRM Properties API.
If you have several properties to update, use the batch API call to make several edits in one call.
Hope this helps :slightly_smiling_face:

Ludwig


Try using this one though : CRM Properties API.
If you have several properties to update, use the batch API call to make several edits in one call.


Looking at the documentation, there doesn’t seem to be a batch API call to make several updates in one call.

You can create, read or achive multiple properties, but you can’t update multiple properties. You can only update via PATCH a single property at a time.