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:
- For this related to the "Support set based SQL operations" property:
- Set the "Support set based SQL operations" property to "no" for the affected entity.
- Create a valid index for the relevant table and define a new entity key for the existing data entity.
- Regenerate the staging table.
- Delete the entity from the data entity list and refresh the entity list.
- For the error regarding the field with ID '0':
- Ensure that all fields in the request are correctly mapped to the fields in the table.
- Perform a full build and database synchronization to ensure all changes are correctly applied.
- Review any recent customizations or additional models/packages installed in the environment that might be causing conflicts.
- Restart the Dynamics AX services as a quick fix.
- If the issue persists, review the code to ensure that the table buffer is being populated correctly.
