--- title: "Add-CustomObject" slug: "scripting-add-customobject" tags: ["Enterprise Only"] updated: 2026-01-20T20:29:34Z published: 2026-01-20T20:29:34Z canonical: "help.agilityblue.com/scripting-add-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. # Add-CustomObject ## Summary Creates a new custom object entry. ```powershell Add-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 ### Create a new 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 # Create 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_58 is a multiple choice field named "Offices" #   CF_97 is a date field named "Terminated On" #   CF_98 is a media log entry reference field named "Collected Media" $custodian = @{    CF_43 = "Casey Copeland"    CF_44 = "Contract ended on 12/1/2024."    CF_58 = "MN`nCA"    CF_97 = "2024-12-06T18:00:00.000Z"    CF_98 = "[{`"objectId`":3,`"key`":62,`"value`":`"#62 - Flash Drive`"}]" } # Pass the custom object to the Add-CustomObject command to create the entry $createdCustodian = Add-CustomObject `    -CustomObjectId $customObjectId `    -Entry $custodian # Use Write-Output to log the execution results Write-Output "Custodian $($createdCustodian.Id) ($($createdCustodian.CF_43)) was created" ``` Execution results: ```plaintext Custodian 17 (Casey Copeland) was created ```