Set-Object

Prev Next

Summary

Updates an existing object.

Set-Object
    -Entry

Returns an object object.

Parameters

Parameter

Type

Required?

Notes

Entry

Object Object

Yes


Examples

Update an existing object

# Get the object
$object = Get-Object -Id 24

# Add an "Is Active?" yes/no field that defaults to yes
$object.Fields += @{
    DataTypeId  = 5
    Label       = "Is Active?"
    IsRequired  = $false
    Position    = 4
    DefaultValue = "True"
}

# Update the ignored file entry
$object = Set-Object -Entry $object

Write-Output "Updated object '$($object.Name)' (Id: #$($object.ObjectId))"

# For debug purposes, convert the entity to output as JSON so we can see the available fields
$jsonOutput = $object | ConvertTo-Json -Depth 10

Write-Output ""
Write-Output "JSON Results:"

# Output the JSON results
Write-Output $jsonOutput

Execution results:

Updated object 'Vendor' (Id: #24)

JSON Results:
{
  "ObjectId": 24,
  "Name": "Vendor",
  "Description": null,
  "AllowCustomFields": true,
  "DefaultDisplayFormat": "%Name%",
  "KeyType": "Int32",
  "IsSystemObject": false,
  "IsListed": true,
  "ListSortOrder": 0,
  "NumberOfFields": 5,
  "Fields": [
    {
      "FieldId": 134,
      "ObjectId": 24,
      "DataTypeId": 1,
      "DataTypeName": "Basic Text",
      "Label": "Name",
      "IsRequired": true,
      "Position": 1,
      "Guid": 45385704063,
      "IsSystemField": false,
      "IsReferenceValue": true,
      "DefaultValue": null,
      "CopyPreviousValueOnSaveAndNew": false,
      "Value": null,
      "ReferenceObject": null
    },
    {
      "FieldId": 135,
      "ObjectId": 24,
      "DataTypeId": 9,
      "DataTypeName": "Multiple Choice",
      "Label": "Locations",
      "IsRequired": false,
      "Position": 2,
      "Guid": 987442716047,
      "IsSystemField": false,
      "IsReferenceValue": false,
      "DefaultValue": "Minneapolis\nLos Angeles\nDallas\nSeattle\nNew York City\nMiami",
      "CopyPreviousValueOnSaveAndNew": false,
      "Value": null,
      "ReferenceObject": null
    },
    {
      "FieldId": 136,
      "ObjectId": 24,
      "DataTypeId": 10,
      "DataTypeName": "Reference",
      "Label": "Contacts",
      "IsRequired": false,
      "Position": 3,
      "Guid": 9678513142778,
      "IsSystemField": false,
      "IsReferenceValue": false,
      "DefaultValue": null,
      "CopyPreviousValueOnSaveAndNew": false,
      "Value": null,
      "ReferenceObject": {
        "ObjectFieldReferenceObjectId": 33,
        "ObjectFieldId": 136,
        "ObjectId": 7,
        "Object": null,
        "KeyType": "Int32",
        "DisplayFormat": "%Val%",
        "IsSystemObject": true,
        "Name": null,
        "NumberOfDefaultValues": 0,
        "DefaultValues": []
      }
    },
    {
      "FieldId": 137,
      "ObjectId": 24,
      "DataTypeId": 2,
      "DataTypeName": "Rich Text",
      "Label": "Notes",
      "IsRequired": false,
      "Position": 4,
      "Guid": 4891671771177,
      "IsSystemField": false,
      "IsReferenceValue": false,
      "DefaultValue": null,
      "CopyPreviousValueOnSaveAndNew": false,
      "Value": null,
      "ReferenceObject": null
    },
    {
      "FieldId": 138,
      "ObjectId": 24,
      "DataTypeId": 5,
      "DataTypeName": "Yes or No Choice",
      "Label": "Is Active?",
      "IsRequired": false,
      "Position": 4,
      "Guid": 3611180858510,
      "IsSystemField": false,
      "IsReferenceValue": false,
      "DefaultValue": "True",
      "CopyPreviousValueOnSaveAndNew": false,
      "Value": null,
      "ReferenceObject": null
    }
  ],
  "CreatedByFullName": "Max Miller",
  "CreatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "CreatedOn": "2026-01-22T14:14:01.8625662+00:00",
  "CreatedBy": null,
  "LastUpdatedByFullName": "Max Miller",
  "LastUpdatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "LastUpdatedOn": "2026-01-22T14:24:39.512532+00:00",
  "LastUpdatedBy": null
}