anzwdev / al-code-outline

AL Code Outline for Visual Studio Code
MIT License
51 stars 13 forks source link

Can't Generate any files through the wizard #164

Closed jigsawmegs closed 4 years ago

jigsawmegs commented 4 years ago

Trying to create a report using the Wizard. No file is generated. I found the wizard is trying to create the file <objectId>.EftDetail.Report.al and not using the object number specified in the wizard where EftDetail is the name I specified

anzwdev commented 4 years ago

My extension uses Waldo's CRS AL Language Extension to generate file names. What value do you have in "CRS.FileNamePattern" setting in your VS Code settings? Are you using "New AL File Wizard" or do you create your report by right clicking on a Table node in AL Outline panel and selecting "Create Report"?

jigsawmegs commented 4 years ago

"CRS.FileNamePattern": "<ObjectTypeShort><ObjectId>.<ObjectNameShort>.al" I have been using the "New AL File Wizard". Just tried the right clicking on a Table node. Same result. Nothing generated.

anzwdev commented 4 years ago

Is just a problem with report wizard or all other object types are also broken? Does page or table wizard work for you? Do you have any special characters in your field names? Are you using the latest version of VS Code? Are you using Microsoft AL Extension from the Visual Studio Marketplace on manally installed *.vsix file?

jigsawmegs commented 4 years ago

Issue happens for all object types. The report would use the Gen. Journal Line table, no special characters. Latest VS Code. I am building for BC14 so have to use the vsix file from the CD iso.

anzwdev commented 4 years ago

I've tried to use AL Extension from BC 14 and all wizards work for me without any problems. Are you using Windows or Mac? Have you checked your "CRS.FileNamePattern" setting on both "User" and "Workspace" tabs in VS Code? Do you have the same problem if you open different AL project or create a new one?

You can also try to create new, clean, portable installation of VS Code and install only Microsoft AL Language, CRS AL Language Extension and mine extensions and check if you still have this problem. To do it:

  1. Download VS Code in a zip from here: https://code.visualstudio.com/#alt-downloads
  2. Extract zip somewhere
  3. Inside extracted VS Code folder you should see code.exe, create "data" folder there - this will tell vs code that it is portable mode and all extensions and other data shoudl be stored there instead of using your user data location
  4. Run code.exe, install all extensions that you need and test if it works

You also don't have to use VSIX from the DVD iso. You only need it if you are developing for Nav 2018, but for BC the extension installed from the VS Code Marketplace can work with all product versions. You only have to change "runtime" property in your app.json. You can find more information here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-developing-for-multiple-platform-versions

jigsawmegs commented 4 years ago

Its a case sensitivity issue: The Pattern defines ObjectId image

But the default created pattern uses objectId image

Once I change the settings to use ObjectId it works.

anzwdev commented 4 years ago

Thank you for finding why it was not working. I've added missing error handling to the wizards, they will show an error if file cannot be created. Update will be included in the next extension release.

anzwdev commented 4 years ago

I've released a new version of the extension with this issue fixes.