Skip to main content

SetObjectLevelProperty

Sets an object-level property.

Syntax

// Assumes shellUI has been initialized with IShellUI instance
const results = await shellUI.Vault.ObjectOperations.SetObjectLevelProperty({
obj_id: {
type: 0,
item_id: {
internal_id: 0,
external_repository_id: {
connection: "<!< The external repository connection identifier.>",
item: "<item>",
},
},
},
property: {
property_def: 0,
value: {
is_null_value: false,
type: 15 /* Enum: Datatype */,
data: {
text: "<!< Text.>",
integer: 0,
real_number: 0,
decimal_number: "<!< Fixed precision number.>",
date: { seconds: 0, nanos: 0 } /* google.protobuf.Timestamp */,
time: { seconds: 0, nanos: 0 } /* google.protobuf.Timestamp */,
timestamp: { seconds: 0, nanos: 0 } /* google.protobuf.Timestamp */,
boolean: false,
lookup: {
value_list_item_info: {
obj_id: {} /* ObjID */,
name: "<!< The name of the item.>",
external_id_status: 5 /* Enum: ExtIDStatus */,
external_id: "<external_id>",
guid: "<!< GUID for the item.>",
options: {
all: false,
is_shortcut: false,
is_deleted: false,
is_accessed_by_valid: false,
has_shared_files: false,
is_conflict_object: false,
is_normal: false,
is_view: false,
has_external_data: false,
is_referred_external_object: false,
},
external_repository_icon_id: "<!< The ID of the item's icon.>",
},
version: {
type: 7 /* Enum: ObjVerVersionType */,
internal_version: 0,
external_repository_version: "<external_repository_version>",
external_repository_sort_key: 0,
},
},
multi_select_lookup: {
values: [] /* Array of Lookup */,
},
integer64: 0,
multi_line_text: "<!< Multi-line text.>",
acl: {
checked_out_to_user: 0,
is_fully_authoritative: false,
custom_component: {
named_acl_id: 0,
has_named_acl: false,
current_user_id: 0,
has_current_user: false,
permissions: [] /* Array of AccessControlEntry */,
overridability_permissions: [] /* Array of AccessControlEntry */,
status: {
all: false,
deleted: false,
source_item_linked_via_pseudo_users: false,
},
},
restrictive_components:
[] /* Array of AccessControlListComponentMapEntry */,
secondary_access_control_list: {} /* AccessControlList */,
additive_components:
[] /* Array of AccessControlListComponentMapEntry */,
},
},
},
},
options: {
all: false,
require_read_access_after_operation: false,
require_edit_access_after_operation: false,
disallow_name_change: false,
require_change_permissions_access_after_operation: false,
require_full_access_after_operation: false,
change_acl_in_all_versions: false,
verify_check_in_wopi_locked_document: false,
},
});

Message

NameDescriptionType
obj_idThe object ID as JSON. (represented by MF_ObjID struct)ObjID
propertyThe new property as JSON.PropertyValue
optionsFlags that control this operation.OBJECTOPFLAGS

Return type

NameDescriptionType
resultInformation about the object after the operation as JSON. (represented by MF_ExtObjectInfo struct.)ExtObjectInfo

Example

{
"result": {
"is_visible": false,
"object_info": {
"obj_id": {
"type": 0,
"item_id": {
"internal_id": 0,
"external_repository_id": {
"connection": "<!< The external repository connection identifier.>",
"item": "<item>"
}
}
},
"external_id_status": 5 /* Enum: ExtIDStatus */,
"external_id": "<external_id>",
"checked_out_version": {
"type": 7 /* Enum: ObjVerVersionType */,
"internal_version": 0,
"external_repository_version": "<external_repository_version>",
"external_repository_sort_key": 0
},
"checked_out_to_user_id": 0,
"checked_out_to_user_name": "<checked_out_to_user_name>",
"checked_out_to_host_name": "<checked_out_to_host_name>",
"checked_out_at_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"checked_in_version": {} /* ObjVerVersion */,
"created_at_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"accessed_by_me_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"guid": "<!< Object GUID.>",
"options": {
"all": false,
"is_shortcut": false,
"is_deleted": false,
"is_accessed_by_valid": false,
"has_shared_files": false,
"is_conflict_object": false,
"is_normal": false,
"is_view": false,
"has_external_data": false,
"is_referred_external_object": false
},
"original_vault_guid": "<original_vault_guid>",
"original_vault_obj_id": {} /* ObjID */,
"associated_view_id": {} /* ItemID */,
"external_repository_icon_id": "<external_repository_icon_id>",
"primary_view_id": {} /* ItemID */,
"capabilities": {
"all": false,
"can_have_history": false,
"can_have_relationships": false,
"can_edit_old_versions": false,
"can_delete": false,
"can_destroy": false,
"can_undelete": false,
"can_rename": false,
"can_edit_metadata": false,
"can_edit_assignments": false,
"can_edit_workflows": false,
"can_edit_files": false,
"can_edit_version_comments": false,
"can_convert_single_multi_file": false,
"can_add_and_remove_files": false,
"can_change_file_type": false,
"can_change_permissions": false
}
},
"is_latest_version_visible": false,
"latest_version": {
"object_version": {
"version_info": {
"version": {} /* ObjVerVersion */,
"title": "<!< The title of the object.>",
"is_single_file_object": false,
"has_assignments": false,
"last_modified_at_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"files": [] /* Array of File */,
"object_version_flags": {
"all": false,
"is_assignment_completed": false,
"has_related_objects": false,
"is_assignment_rejected": false,
"has_file_duplicates": false
},
"class_id": 0,
"version_guid": "<!< GUID of the object version.>",
"primary_file": {
"type": 3 /* Enum: FileIDType */,
"internal_id": 0,
"external_repository_id": "<!< External file id.>"
}
},
"object_info": {} /* ObjectLevelInfo */
},
"properties": [] /* Array of PropertyValue */,
"acl": {
"checked_out_to_user": 0,
"is_fully_authoritative": false,
"custom_component": {
"named_acl_id": 0,
"has_named_acl": false,
"current_user_id": 0,
"has_current_user": false,
"permissions": [] /* Array of AccessControlEntry */,
"overridability_permissions": [] /* Array of AccessControlEntry */,
"status": {
"all": false,
"deleted": false,
"source_item_linked_via_pseudo_users": false
}
},
"restrictive_components": [] /* Array of AccessControlListComponentMapEntry */,
"secondary_access_control_list": {} /* AccessControlList */,
"additive_components": [] /* Array of AccessControlListComponentMapEntry */
},
"current_user_permissions": {
"can_user_see": false,
"can_user_edit": false,
"can_user_delete": false,
"can_user_change_permissions": false
}
},
"original_obj_ver": {
"obj_id": {} /* ObjID */,
"version": {} /* ObjVerVersion */
}
}
}