# CreateCustomReportSchema Stored Procedure fails for Report of Customer aging header object

**URL:** <https://community.cdata.com/t/createcustomreportschema-stored-procedure-fails-for-report-of-customer-aging-header-object/1082>\
**Category:** CData Connect Cloud\
**Tags:** custom-reports, custom-report, discussion, sage-intacct, stored-procedure\
**Created:** [April 30, 2025, 5:53pm UTC](https://community.cdata.com/t/createcustomreportschema-stored-procedure-fails-for-report-of-customer-aging-header-object/1082 "2025-04-30T17:53:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naomi\_Y](https://avatars.discourse-cdn.com/v4/letter/n/ea666f/32.png) [@Naomi\_Y](https://community.cdata.com/u/Naomi_Y)\
**Post date:** [April 30, 2025, 5:53pm UTC](https://community.cdata.com/t/createcustomreportschema-stored-procedure-fails-for-report-of-customer-aging-header-object/1082/1 "2025-04-30T17:53:25Z")

</div>

When I attempt to create a custom report schema using the CreateCustomReportSchema Stored Procedure in Connect Cloud, I am immediately faced with an error of “_The query failed with the following error: [XXX] . Object type CUSTAGINGHEADER not found [Support ID: A7zYCWEB031%7EaBE82P4709e47gZ-UY9JLgAAABg]._”

How do I resolve this?

---

<div class="post-metadata">

**Author:** ![Naomi\_Y](https://avatars.discourse-cdn.com/v4/letter/n/ea666f/32.png) [@Naomi\_Y](https://community.cdata.com/u/Naomi_Y)\
**Post date:** [April 30, 2025, 5:53pm UTC](https://community.cdata.com/t/createcustomreportschema-stored-procedure-fails-for-report-of-customer-aging-header-object/1082/2 "2025-04-30T17:53:48Z")

</div>

It seems Sage Intacct’s Legacy API, which our Connectors use by default, does not accept querying the CUSTAGINGHEADER (Customer aging header) object. The Legacy API uses the inspect function when retrieving your data and it does not seem to be supported here.

To resolve this issue, you will want to use Sage Intacct’s newer API instead. You can do so by setting the UseLegacy connection property to false. After doing so, our Connector will use the lookup function for the CUSTAGINGHEADER object, which will successfully return your data.
