shashisadasivan / SSD365VSAddIn

Visual studio addin for D365 Finance and operations
https://shashisadasivan.github.io/SSD365VSAddIn/
MIT License
35 stars 22 forks source link

Add Module references from Compile error #24

Closed shashisadasivan closed 3 years ago

shashisadasivan commented 4 years ago

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.

shashisadasivan commented 4 years ago

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
shashisadasivan commented 4 years ago

This has broken with v10.0.10 upgrade

shashisadasivan commented 3 years ago

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"

shashisadasivan commented 3 years ago

EdtEnums needs to be considered