-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AD0001 in specific app.json #682
Comments
@SorenBogelund-ECIT, thank you for reporting this error. Not sure what's causing this at the moment, but I've added an check in the pre-release version of the LinterCop to identify the line of code responsible for this exception. Could you switch to the pre-release version of the LinterCop look for a LC0000 diagnostic? Would be great if you could share a small code example so I could investigate this. |
@SorenBogelund-ECIT, did you by any chance had the time to look into this? |
I believe this needs to be a User Setting I've never try'ed as a workspace-setting, so not sure if this works. After setting this, you need to close all(!) VS Code windows and after that opening the AL project it will download the pre-release version of the LinterCop, where you should no longer have the error on the app.json, but on the specific line in the AL file. You could also manually grab the BusinessCentral.LinterCop.dll file from the releases and override this in the |
@SorenBogelund-ECIT , thank you for providing these, this was exactly the information what I was looking for. This should now be resolved in the (pre)release version of v0.30.28 of the LinterCop, where the error shouldn't occur anymore. For now the LC0027 diagnostic will not be raised for this example, where I believe it should. If these are the pages are the same as the 'LookupPageId' of the entity (Table) itself, you can replace the case statement with one single line. I'll create a separate issue to look if we can the LC0027 rule to also show an diagnostic on this scenario. EDIT: This example below isn't right I release now, sorry. This will show the ListPage of the entity with probably one single record with your example. I didn't pay attention that you're referring to the CardPage, where the Page Management codeunit defaults to the LookupPageId, which mostly returns the ListPage. local procedure HandleError(MyErrorInfo: ErrorInfo)
var
PageManagement: Codeunit "Page Management";
RecRelatedVariant: Variant;
begin
RecRelatedVariant := MyErrorInfo.RecordId.GetRecord();
// case MyErrorInfo.TableId of
// Database::Resource:
// Page.Run(Page::"Resource Card", RecRelatedVariant);
// Database::"Allocation Account":
// Page.Run(Page::"Allocation Account", RecRelatedVariant);
// Database::"Item Charge":
// Page.Run(Page::"Item Charges", RecRelatedVariant);
// Database::"G/L Account":
// Page.Run(Page::"G/L Account Card", RecRelatedVariant);
// end;
PageManagement.PageRun(RecRelatedVariant);
end; |
The version v0.30.28 of the LinterCop is now the latest release. |
Discussed in #680
Originally posted by SorenBogelund-ECIT July 8, 2024
I have an issue with a specific app.json in a specific repository. The issue does not appear in other app.json files. For some reason 10 warnings are generated for no reason?
The text was updated successfully, but these errors were encountered: