Views:

Applies to Product - Dynamics 365 Commerce
 

What’s happening?
Customers are experiencing an error when attempting to execute code related to data import or integration, specifically receiving the message: "The field with ID '0' does not exist in table 'ResResourceSetupDataEntity'" or similar errors related to custom entities.
 

Reason:
This is primarily due to a bug in the system, particularly when the "Support set based SQL operations" property is incorrectly set to "yes" without a proper key defined for the entity or base table. Additionally, there may be mismatches in field mappings or issues with database synchronization.
 

Resolution:

  1. For this related to the "Support set based SQL operations" property:
  2. Set the "Support set based SQL operations" property to "no" for the affected entity.
  3. Create a valid index for the relevant table and define a new entity key for the existing data entity.
  4. Regenerate the staging table.
  5. Delete the entity from the data entity list and refresh the entity list.
  6. For the error regarding the field with ID '0':
  7. Ensure that all fields in the request are correctly mapped to the fields in the table.
  8. Perform a full build and database synchronization to ensure all changes are correctly applied.
  9. Review any recent customizations or additional models/packages installed in the environment that might be causing conflicts.
  10. Restart the Dynamics AX services as a quick fix.
  11. If the issue persists, review the code to ensure that the table buffer is being populated correctly.
If these steps do not resolve the issue, further investigation into the specific implementation details may be required.