--- title: "Set-CustomObject" slug: "scripting-set-customobject" updated: 2026-01-20T20:29:56Z published: 2026-01-20T20:29:56Z canonical: "help.agilityblue.com/scripting-set-customobject" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Set-CustomObject ## Summary Updates an existing custom object entry. ```powershell Set-CustomObject    -Entry    -CustomObjectId ``` Returns a [custom object entry](https://apidocs.agilityblue.com/#8fa4e4b4-452d-49b8-9a08-03b936874e54) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [Custom Object Entry](https://apidocs.agilityblue.com/#8fa4e4b4-452d-49b8-9a08-03b936874e54) Object | Yes | The custom object instance to create as a new entry. | | CustomObjectId | Int32 | Yes | The object id. | ## Examples ### Update an existing custom object entry ```powershell # Store id of the custom object to reference later. In this case, we have a "Custodian" custom # object that has an id of 14 $customObjectId = 14 # Update a custom object where CF_# is the custom field id for each field on the object. # In this example: #   CF_43 is a basic text field named "Name" #   CF_44 is a rich text field named "Notes" #   CF_98 is a media log entry reference field named "Collected Media" # Retrieve an existing custom object using the Get-CustomObject cmdlet $custodian = Get-CustomObject -CustomObjectId $customObjectId -Id 17 # Change some properties $custodian.CF_44 = "Contract ended on 12/1/2024." $custodian.CF_98 = "[{`"objectId`":3,`"key`":62,`"value`":`"#62 - Flash Drive`"}]" # Update the billing type using the Set-CustomObject cmdlet $updatedCustodian = Set-CustomObject `    -CustomObjectId $customObjectId `    -Entry $custodian # Output a message to the execution log Write-Output "Updated custodian $($updatedCustodian.Id) ($($updatedCustodian.CF_43))" ``` Execution results: ```plaintext Updated custodian 17 (Casey Copeland) ```