Not getting Quick fix options
Issue Type: Bug
I am tring to update my code for a coming change by Microsoft. This change has to do with the WITH Statement being obsoleted. We have several sections of code that utlize this statement. From all the documentation I have seen on this, there should be a quick fix for this. I have not been able to get any quick fix options to show up for my errors. I don't know if I am missing something or they are in another extension that I don't have.
Extension version: 6.0.344420 VS Code version: Code 1.49.3 (2af051012b66169dde0c4dfae3f5ef48f787ff69, 2020-10-02T17:57:01.595Z) OS version: Windows_NT x64 10.0.17763
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz (1 x 2195) |
| GPU Status | 2d_canvas: unavailable_software flash_3d: disabled_software flash_stage3d: disabled_software flash_stage3d_baseline: disabled_software gpu_compositing: disabled_software multiple_raster_threads: disabled_off oop_rasterization: disabled_off opengl: disabled_off protected_video_decode: disabled_off rasterization: disabled_software skia_renderer: disabled_off_ok video_decode: disabled_software vulkan: disabled_off webgl: unavailable_software webgl2: unavailable_software |
| Load (avg) | undefined |
| Memory (System) | 16.00GB (13.70GB free) |
| Process Argv | --crash-reporter-id c6fa4467-e963-4342-87a6-d5de876f9009 |
| Screen Reader | no |
| VM | 0% |
You can use this VS Code extension for fixing it: https://marketplace.visualstudio.com/items?itemName=andrzejzwierzchowski.al-code-outline Description: https://twitter.com/anzwdev/status/1311783292857995264?s=20
...but unfortunately that extension suffers from these bugs: https://github.com/microsoft/AL/issues/6190#issuecomment-703746307
I have seen this from "AZ AL Dev Tools" extension, which may be calling the underlying 'official' fixers? - and which also gets this [prepending
Rec.to field names where there can be no ambiguity] wrong for other functions likeTestField,GetFilter,CalcFields- and, worse, also appends a pointless 2nd record name to variables other thanRec!! e.g. I saw it producing code something likeSEPADirectDebitMandate.SetRange(SEPADirectDebitMandate."Mandate ID", ...- gross!
Then use this extension to fix all implicit withs: https://marketplace.visualstudio.com/items?itemName=davidfeldhoff.al-codeactions I have used this one, it definitely works very well if you mind the instructions how to use.
I tried the fix implicit in the AL CodeActions extension and it was placing Rec. several times and in the middle of code causing new errors to pop up. Is there one that handles the explicit with statements though? Some of mine can be long sections of code. This is mainly to do with subscribers or our own posting processes. I have seen snapshots of a quickfix option to do this, but I am not getting this from base VSC and AL extension. I am hoping to find a solution to this before I have to just past the table variable over and over.
The first extension I mentioned was supposed to also fix explicit withs.
The first one seems to work fine thank you.