shashisadasivan/SSD365VSAddIn

Add Module references from Compile error

shashisadasivan opened this issue · 4 comments

When a compile error exists, use
Dynamics 365 > AddIns > Add Missing references - experimental (SS D365)

This should read the error list, then add references based on the EDT, Table, Class (may need to cater for enums, entity, views, query, etc .... )

Logic:

  1. Read error list - find errors with the text similar to: The name 'ABCPercentA' does not denote a class, a table, or an extended data type
  2. For each of the errors, find the element's model & add it to the refrence
  3. Refresh the model - Not sure how to do that
  4. Rebuild the model - Currently doing a clean & build, but this doesnt have the same effect :(
  5. Repeat steps 1 - 5 until the error list does not have the matching errors

Another error type found is:
The 'SubledgerJournalAccountEntries' argument of the 'menuitemDisplayStr' compile-time function does not specify a known menu item display.

This currently adds the references based on the error list.
it then tried to clean & build the project.
However, this isint very successful.
The steps that seems to work manually are:

  1. Compile project (if you get the errors then continue)
  2. Select Dynamics D365 > Addins > Add Missing references - experimental (SS D365)
  3. Refresh models
  4. Rebuild project
  5. Loop through the process if you see the errors

This has broken with v10.0.10 upgrade

Once references have been added, Navigate to Dynamics 365 > Model Management > Update Model parameters , then select your model and click Next, Next, Finish. At this stage the Models are refreshed. Refresh models doesn't work "Dynamics 365 > Model Management > Refresh Models"

EdtEnums needs to be considered