Views:

Applies to Product - Dynamics 365 Business Central


What’s happening?
Customers are experiencing installation failures when attempting to add table extensions that include indexes across multiple extensions in Dynamics 365 Business Central. The error messages indicate issues related to field references and extension dependencies.
 

Reason:

  1. Extension Dependencies: The error occurs when trying to add an index to a table that exists in a different extension, suggesting that dependencies between extensions are not properly managed.
  2. Field Reference Issues: Errors indicate that specific fields cannot be found in the target table, implying that the table extension is trying to reference fields that do not exist or are not accessible.
  3. Load Order: The issue may be related to the extension load order, where the extension containing the base table is not loaded before the extension trying to add the index.

 

Resolution:

  1. Verify Field Existence and Accessibility:
  2. Open the AL code for the table extension in the relevant extension.
  3. Locate the key addition that is causing the error.
  4. Verify that all field names or IDs used in the key are correct and exist in the target table.
  5. Check Extension Dependencies:
  6. Open the app.json file of the relevant extension.
  7. Ensure that the dependencies section includes the extension that contains the target table.
  8. Review Table Extension Definition:
  9. Open the table extension for the target table.
  10. Verify that the extends property correctly references the target table and that the fields intended for inclusion in the index are properly defined.
  11. Adjust Load Order:
  12. In the app.json file, add a platform version that is higher than the extension containing the target table.
  13. If possible, increase the version number of your extension to ensure it loads after its dependencies.
  14. Rebuild and Republish:
  15. After making the necessary changes, rebuild your extension.
  16. Unpublish the old version of the extension from your environment.
  17. Publish and install the new version of the extension.
  18. Verify Installation Order:
  19. When installing multiple related extensions, install the base extension (containing the target table) first, followed by the extension that adds the index.
  20. Check for Circular Dependencies:
  21. Ensure there are no circular dependencies between your extensions. Each extension should have a clear, one-way dependency on others.
If issues persist after following these steps, further investigation may be required to identify specific problems related to the extensions or the environment.