Creating, retrieving and querying custom objects with CustomObjectMgr
Key Takeaway
Work with custom objects through the static methods of CustomObjectMgr. To create an instance only if its key is unused, create it only after getCustomObject returns null for that key. Close the SeekableIterator from queryCustomObjects if you don't read every result.
A custom object stores business data that has no natural home on a standard B2C Commerce system object, such as order shipping-time records. You define the custom object type, meaning its key and its attributes, in Business Manager. Your scripts then use the static methods of dw.object.CustomObjectMgr to create, fetch, query and remove instances of that type.
When to use a custom object
Use a custom object only when nothing else works, because custom objects can significantly impact performance. Custom objects are also typically unnecessary.
Try adding custom attributes to an existing system object first. Create a custom object only when the data is especially complex. Keep in mind that custom object attributes can't be used in search refinement.