Skip to main content
Question

Acumatica OData Metadata is Non-Compliant with Schema Referenced

  • February 20, 2026
  • 1 reply
  • 0 views

Forum|alt.badge.img

In 25R2, I have exposed custom generic inquiries via OData, set up a connected application, and can call the OData endpoints from Postman.  I handed-off the initial collection to our MS dev lead so that he could wire them into a custom application.  He is attempting to generate T4 templates against the v3 metadata using a VS extension tool, but the metadata is not well-formed according to the schema referenced. 

 

First, all of the standard GIs exposed via OData have naming validation errors with dashes or spaces in the names, so I removed the OData checkbox and republished them.  Second, it appears that Acumatica does not add Nullable="false" to the fields in the Keys sections, no matter what the underlying field definition is, and thus there is a generation error for every key field indicating “All parts of the key must be non-nullable.”.  So, he is downloading the metadata file, scripting the addition of the attribute to every key field and then generating against the local copy of the file.

 

Has anyone else run into this issue? It’s fine for a one-time process but not ideal for continued development.  Thanks.

1 reply

Forum|alt.badge.img
  • Author
  • Varsity II
  • February 20, 2026

To add, attempting to use a comprehensive SQL view and a generated DAC with no keys defined does not work either.  The Keys section is eliminated in the metadata for the method, and the GI and OData calls work fine, but attempting to code gen against the metadata results in the error “error 0159: EntityType 'PX.Data.<GIName>' has no key defined. Define the key for this EntityType.”.