Giter VIP home page Giter VIP logo

alstudio's Introduction

AL Studio

Development Productivity Suite for Business Central

Available on Visual Studio Code Marketplace

Link: https://marketplace.visualstudio.com/items?itemName=dynasist.al-studio

Welcome

AL Studio is a VS Code extension that aims to enhance current working experience of Microsoft Dynamics 365 Business Central development. This repository is to provide a place for discussion, tracking issues and suggestions related to AL Studio.

Note:

This is a premium extension with a free, community edition.

Premium subscription can be purchased on our website: https://al.studio/pricing


Introduction

AL Studio is a set of visual tools for editing, navigating or documenting AL Objects without complex running environments. It is built with a holistic approach that aims to provide users with better understanding of their whole workspace.

Product showcase

Visit out our YouTube channel to see AL Studio features in motion.

Features at glance


Community Features


Workspace overview: AL Home

AL Home screen is automatically loading after opening a VS Code folder / workspace. It is designed to function as a starting dashboard for usual developer/consultant activities. AL Studio can process the complete workspace information whether it be from downloaded symbols, runtime symbols or source files.

Features

  • Set active project, launch build/publishing or a debug session without the need of focusing on a project-related file.
  • Overview workspace projects and their dependencies.
  • Overview, search, filter objects, event publishers or subscribers.
  • Show source or designer for selected objects, event publishers or subscribers.
  • Organize selected entries into scopes (bookmarks).
  • Advanced data grid allows customized filtering.


Scopes (Bookmarks)

You can create focused sets of objects, event publishers or subscribers using the object list on AL Home screen and the "Add selected to Scope" button.

It is designed to help focusing on specific tasks or troubleshooting where a limited number of objects, event publishers or subscribers are involved.

Scopes are maintained in a local json file that can be excluded from source control or even be shared with other co-workers if needed.

Features

  • Creation of new scopes
  • Scope entries can be added/removed individually
  • Clicking on a scope entry opens related object editor or source code
  • Deletion of a scope also deletes the related entries


Workspace wizard

This screen helps with creating complete workspaces consisting multiple apps. The command is also available on the sidebar as a button when no workspace is open.

Features

  • Set workspace name that will be the name of the .workspace file
  • Set root folder of the new workspace
  • Set basic information that will be applies to each new project
    • BC Version
    • Target (Cloud, OnPrem, etc...)
    • Author
    • Launch config
  • Define multiple projects with its own ranges
    • Set App name and folder name
    • Set to add Test project
    • Set Test project range


Translation Overview

This screen provides a matrix-like summary of all available XLF translations found in the workspace. Left columns represent data from generated XLF files, translations are dynamically displayed as additional columns.

Features

  • View translations as filterable grid
  • Quick search
  • Export to Excel


Table Fields, Fieldgroups, Keys

This screen provides a complete list of all fields, fieldgroups and keys that are present within workspace objects or symbol packages.

Features

  • View all table Fields
  • View all table Fieldgroups
  • View all table Keys
  • Quick search
  • One-click navigation by clicking on Table or Field/Fieldgroup/Key name


Snapshots

Snapshots screen in AL Studio provides a visual interface to overview and examine recorded snapshots within the workspace. You can see the complete call-stack as a tree-view, and also the list of objects that were hit during the snapshot recording.

Note: this feature is in preview and subject to change in the final release.

Features

  • List of workspace snapshots as a Project - Snapshot parent-child tree
  • Complete call-stack as a tree-view
  • Related objects: individual objects that are related to a snapshot
  • Start debugging for selected snapshot.
  • One-click navigation to source of related objects


Unified Search

This screen provides a unified experience to search in many different areas of the complete workspace.

Features

  • Search for Objects, Event Publishers, Subscribers
  • Search for Table Fields, Groups or Keys,
  • Search in Object Properties
  • Search in Translation files
  • Search in local source code
  • Search in Symbol package source code (if included)


Table editor

This view allows developers and consultants to overview and edit table structure.

Features

  • Manage table fields, field groups or keys in a data grid
    • Add, edit, delete items
    • Copy-paste fields from Excel
  • Property window for selected item that shows related properties
  • Display table and its extensions in a single comprehensive view
  • Navigate to table or specific extension source


Page editor

This view allows developers and consultants to overview and edit page layout without having to setup docker or local Business Central instances.

Features

  • Display page and its extensions in a single comprehensive view
  • Navigate to page or specific extension source
  • Layout designer: visual representation of pages
  • Action designer: display action in a tree-structure manner
  • Changes: summary of changes made by page extensions
  • Property window for selected item that shows related properties
  • Menu bar: actions displayed the same as it is visible in the web client
    • Actions with RunObject property are navigable to load the related Page Designer
  • Screenshot: you can take a full-page screenshot of a given page.

Layout:

Actions:

Changes (extensions):


Enum editor

This view allows developers and consultants to overview and edit enum structure.

Features

  • Manage enum values in a data grid
    • Add, edit, delete items
  • Property window for selected item that shows related properties
  • Display table and its extensions in a single comprehensive view
  • Navigate to table or specific extension source


Codeunit, Interface, Control Add-in viewers

This window provides a general overview of any codeunit, interface of control add-in object. Methods and Event publishers/subscribers are displayed on two columns next to each other.

Features

  • Search for method/event name
  • Show Properties
  • Show source code
  • Export method signatures to markdown file


Generate documentation

This module allows you to create a complete, markdown-based API documentation for a project or workspace. Markdown is a human-readable format that can be converted to HMTL or many other formats using external tools.

Generated files are internally navigable, there is a table of contents for objects and for methods/events inside the objects.

Features

  • Single documentation creation from Codeunit/Interface viewer
  • Complete documentation creation for opened workspace
    • One big markdown file is created
    • A folder with one Markdown/object structure is also created

Command-line Interface

Command line availability streamlines product activation and helps integrating documentation generation, transferfield validation into DevOps build process.

Features

  • Product activation
  • Documentation generation

Transferfield validation by ruleset definition

Ensure the integrity of Transferfields rules using validation json definitions per extensions.

Parameters:

-w, --workspaces : input folder of projects.

It can be a single path or a comma-separated list of paths. In case of many apps within a main folder, specifying the main folder path is sufficient.

o, --output : path to save the validation result json file (optional).

You need to specify the complete path including filename.

Validation Rules:

Validation works using ruleset files named transferfields.rules.json that are placed into the root of each app folder. You can define rules per app.

[
    {
        "Name": "Custom Table Transferfields",
        "Source": "MySalesTable",
        "Fields": [
            {
                "Id": 1,
                "Requirement": 2
            },
            {
                "Id": 2,
                "Requirement": 2
            },
            {
                "Id": 3,
                "Requirement": 2
            },
            {
                "Id": 5,
                "Requirement": 1
            }
        ],
        "Destinations": [
            "MySalesTargetTable1",
            "MySalesTargetTable2"
        ],
        "ErrorAction": 2
    }
]

Fields that are not listed in Fields member will still be validated using Default requirement type.

Requirement values:

Value Name Description
0 Default Standard behaviour is validated only, e.g. Field Type match
1 MustOmit Specifies that a field must not be present in related tables
2 Required Specifies that a field must be present in related tables

ErrorAction values:

Value Name Description
0 None Validation is turned off.
1 Warning Validation result only create output as warning, with ExitCode 0
2 Error Validation runs normally with ExitCode 0/1 depending on result

Validation result:

Result is displayed on command line output and also can be saved into a json file.

  • Successful validation returns ExitCode 0.
  • Failure returns ExitCode 1, so in DevOps it will break the build.


External API for VSCode extension developers

AL Studio has a public API that is available for other VSCode extension developers. This API is provided even in the Free version and can be re-used by free/opensource extensions free of charge, without purchasing license.

Main API functions:

export interface IExternalAPIService {
    isWorkspaceScanned: boolean;
    onWorkspaceScanned: Function | undefined;
    getObjects(): Array<CollectorItemExternal>;
    getNextId(type: ALObjectType, projectNameOrFilePath: string): Promise<number>;
    getSymbolUri(type: ALObjectType, name: string, standardFormat: boolean): Uri | null;
    getALLanguageApiService(): IALLanguageApiService;
}

Complete type definitions are available on GitHub: https://github.com/dynasist/ALStudio/blob/master/extension.d.ts

Properties

Syntax

isWorkspaceScanned: boolean;

Indicates whether the initial workspace scanning has been finished.

Syntax

onWorkspaceScanned: Function | undefined;

Event fired when the initial workspace scanning is finished. You can subscribe to this event by assigning a simple function to it.

Example:

alStudioAPI.onWorkspaceScanned = () => {
    console.log('Workspace has been scanned!');
}

Methods

Syntax

getObjects(): Array<CollectorItemExternal>;

Gets the complete set of objects collected from files and symbol packages. It containes Objects, EventPublishers and EventSubscribers as well. This list is automatically maintained by AL Studio, calling getObjects() will always return the latest, updated set.

Syntax

getALLanguageApiService(): IALLanguageApiService;

Gets a simplified API reference for AL Language Extension itself.

Syntax

getSymbolUri(type: ALObjectType, name: string, standardFormat: boolean = false): Uri | null;

Gets generated preview URI for symbol objects. This can be used to manually show source code preview window of specific symbols.

Syntax

getNextId(type: ALObjectType, projectNameOrFilePath: string): Promise<number>;

Gets the next available object ID for the given object type in the specified Application name or file path. projectNameOrFilePath can be an:

  1. App name exactly how it is defined in app.json, e.g. Base Application
  2. Absolute filepath of any object within an app folder
  3. Absolute filepath of the app folder
  4. Absolute filepath of the app.json file

In latter case, the proper app.json will be implicitly search for.

Getting an AL Studio API reference in another VSCode extension:

import { extensions } from 'vscode';

async function getAlStudioAPI() {
    let alStudio: Extension<any> = extensions.getExtension('dynasist.al-studio')!;
    if (alStudio) {
        if (!alStudio.isActive) {
            await alStudio.activate();
        }

        return alStudio.exports;
    }
}

Known Issues

Issues to be fixed before first release:

  • Saving changes from Table/Page/Enum editors to their respective files may fail and is unstable.
  • [Solved] Table/Page/Enum editors are not updated on outside file changes.
  • AL Home:
    • [Solved] Removing an entry from a Scope does not work.
    • [Solved] Caching is too aggressive: object list is not updated.
  • Translation overview:
    • Language files are not yet synchronized automatically.
  • Table editor:
    • Copy-paste fields does not work.
  • Page editor:
    • Displayed Page view is a close but not 100% match to Business Central.
    • Drag&Drop between Page Parts is possible. It should be prevented.
    • [Solved] Display of System parts and User Controls are not yet implemented.
  • CLI Documentation Generation: "Public Only" flag does not work.

Planned Features

After first release:

  • Create Languages/Edit Translations
  • Report DataSet editor
  • Query Designer
  • XmlPort Designer
  • Advanced editors for Property Window

alstudio's People

Contributors

martonsagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

amurshed7

alstudio's Issues

Table Editor: Navigate to a field in the source code

Expected behaviour:
In the Table Editor I would like to double-click a field and position a cursor at that field in the source code.

Current behaviour:
I have to manually click the "Source" button in the Table Editor. It opens the code in a new tab and positions the cursor at the top of the file. I have to find the code myself.

Go to definition on a standard object: "A request has failed"

An error is thrown from the AL Language extension actually, but I can reproduce it only with AL Studio involved.
Can you confirm it is a mere AL Language error?

I am developing an extension depending on the Base Application.

  1. In AL Home, go to table 36, and click on the name "Sales Header".
  2. In the Fields page, click on "Source".
  3. Go to field 1, and try F12 on Enum "Sales Document Type".
  4. Error: "A request has failed. See the output for more information."

Output AL:

[Error - 13:02:05] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'al/gotodefinition' failed with error: 'Index was outside the bounds of the array.'
Details:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.FilePathHelper.ParsePreviewFileUrl(Uri uri) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\FilePathHelper.cs:line 97
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDeclaringSymbolAsync(Uri previewUri, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 137
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetContentAsync(Uri previewUri, LaunchConfiguration configuration, CancellationToken token, Boolean relyOnCachedValue) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 73
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDefinitionForSymbolAtPositionAsync(Uri previewUri, Position requestPosition, LaunchConfiguration configuration, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 101
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.AlDefinitionRequestHandler.ProcessRequestAsync(AlDefinitionRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\AlDefinitionRequestHandler.cs:line 50
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.NavServerRequestHandler`2.HandleAsync(T request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\NavServerRequestHandler.cs:line 40
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 65
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 80

If I disable AL Studio and open the Sales Header.dal (which btw does not include code, just the fields) and press F12 on the enum, it just says "No definition found for ...". But no unhandled error logged.

Cannot open "Fields" from AL Home

When I try to open "Fields" from the AL Home:
image

Then I receive:

An unexpected error occurred invoking 'GetTableFields' on the server. FormatException: Input string was not in a correct format.

Output:

[AL Studio][2020-12-02T07:23:44.554Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'GetTableFields'.
      System.FormatException: Input string was not in a correct format.
         at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
         at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
         at System.Int32.Parse(String s)
         at ALObjectParser.Library.ALTable.<>c.<ProcessSections>b__22_0(IALSection s)
         at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
         at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
         at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
         at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
         at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
         at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
         at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
         at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
         at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
         at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToList()
         at ALStudio.Server.Services.ALObjectService.GetTableFields()
         at ALStudio.Server.Services.ALObjectService.GetTableFieldsModel(Boolean reload)
         at ALStudio.Server.ALStudioHub.GetTableFields()
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteMethod(ObjectMethodExecutor methodExecutor, Hub hub, Object[] arguments)
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass16_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()

Multiroot Workspace - translations

Not sure it's my fault, but it appears to error out on my translations. Could be that I have a double key - though it simply compiles :-/

An unexpected error occurred invoking 'QueryTranslations' on the server. AggregateException: One or more errors occurred. (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: nl-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: nl-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE)

Output:

[AL Studio][2020-10-08T20:06:46.021Z][Debug]: Translation processing started...

[AL Studio][2020-10-08T20:06:46.425Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'QueryTranslations'.
System.AggregateException: One or more errors occurred. (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: nl-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (One or more errors occurred. (An item with the same key has already been added. Key: fr-BE)) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: nl-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE) (An item with the same key has already been added. Key: fr-BE)
 ---> System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
   at System.Linq.Parallel.SpoolingTask.SpoolStopAndGo[TInputOutput,TIgnoreKey](QueryTaskGroupState groupState, PartitionedStream`2 partitions, SynchronousChannel`1[] channels, TaskScheduler taskScheduler)
   at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
   at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)
   at System.Linq.Parallel.GroupByQueryOperator`3.WrapPartitionedStreamHelper[TIgnoreKey,TKey](PartitionedStream`2 hashStream, IPartitionedStreamRecipient`1 recipient, CancellationToken cancellationToken)
   at System.Linq.Parallel.GroupByQueryOperator`3.WrapPartitionedStream[TKey](PartitionedStream`2 inputStream, IPartitionedStreamRecipient`1 recipient, Boolean preferStriping, QuerySettings settings)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)
   at System.Linq.Parallel.ScanQueryOperator`1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
   at System.Linq.Parallel.QueryOpeningEnumerator`1.OpenQuery()
   at System.Linq.Parallel.QueryOpeningEnumerator`1.MoveNext()
   at System.Linq.ParallelEnumerable.ToList[TSource](ParallelQuery`1 source)
   at ALStudio.Server.Services.TranslationService.GetTranslationModel(IEnumerable`1 paths)
   at ALObjectDesigner.Library.ALObjectCollectorCacheService.GetTranslation(Boolean reload)
   at ALStudio.Server.ALStudioHub.QueryTranslations(IEnumerable`1 paths)
   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)
   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass13_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()
 ---> (Inner Exception #1) System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
 
[AL Studio][2020-10-08T20:06:46.425Z][Debug]:   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

 ---> (Inner Exception #2) System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

 ---> (Inner Exception #3) System.ArgumentException: An item with the same key has already been added. Key: nl-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

 ---> (Inner Exception #4) System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

 ---> (Inner Exception #5) System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

 ---> (Inner Exception #6) System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

 ---> (Inner Exception #7) System.ArgumentException: An item with the same key has already been added. Key: fr-BE
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_15(IGrouping`2 s)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

Extension causes high cpu load: Debugger affected

Hi Márton,

VS Code told me to notify you about
image
after I reloaded VS Code. During that, VS Code was generally hardly responding, and I am questioning that ALStudio was the cause, but also only suffering from it.

  • Issue Type: Performance
  • Extension Name: al-studio
  • Extension Version: 0.9.880
  • OS Version: Windows_NT x64 10.0.19042
  • VSCode version: 1.54.1

My CPU profile:
dynasist.al-studio-unresponsive.cpuprofile - Copy.txt

I could not reproduce it since.
But I thought to post it anyway, just in case the CPU profile might contain something useful for you.

AL Home page (object list)

Hey team!

A few bugs with the object list on AL Home page:

  1. When applying filters, the format of the fields designated for object numbers seems to be incorrect:
    image
    The whole idea of filtering is not really handy. How about adding wildcard filter support? Regex? Or support for good old classic NAV client filtering criteria, like periods "..", "|", "&" 😉
  2. Marks periodically are lost. After git operations, like branch syncing. Sometimes after saving files.
  3. If you edit an object, it disappears from the object list
    image
    I couldn't get the objects reappear again in the list, even after committing and synchronizing changes to AzureDevOps or restarting the AL Home page.
    I had to restart VS Code to have the objects displayed in the list again.

Many thanks!

Unexpected Go To Definition when using the Ctrl key

This one is quite critical :-D

v0.9.568 introduced a feature to link objects from code for a quick Go To Definition (F12).
But it overrules all shortcuts starting with Ctrl.

Feature?
Press and hold Ctrl, and then hover (!) on a codeunit variable name --> the codeunit will be opened in a new tab.

Side effect = bug
Try e.g. to delete a line using Ctrl+Shift+K, while your cursor is on the variable name.
The moment you press Ctrl, the objects is opened, hence you cannot use the shortcut.

NullReference Exception On CreateTable Extension

I am making an extension for a BC 15.3, and when I from the table list click the 3 dots and select extend, i get the Error shown.

An unexpected error occurred invoking 'ExtendObject' on the server. NullReferenceException: Object reference not set to an instance of an object.

This is from the Output:

[AL Studio][2020-11-02T09:25:17.490Z][Debug]: dbug: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[1]
      Received hub invocation: InvocationMessage { InvocationId: "22", Target: "ExtendObject", Arguments: [ ALObjectDesigner.Library.SymbolData ], StreamIds: [  ] }.

[AL Studio][2020-11-02T09:25:17.509Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'ExtendObject'.
      System.NullReferenceException: Object reference not set to an instance of an object.
         at ALStudio.Server.Services.ALObjectService.ExtendObject(SymbolData info)
         at ALStudio.Server.ALStudioHub.ExtendObject(SymbolData info)
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteMethod(ObjectMethodExecutor methodExecutor, Hub hub, Object[] arguments)
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass16_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()

An unexpected error occured invoking "querytranslations"

When clicking translations:
image

it's a multiroot workspace.


[AL Studio][2020-12-01T17:28:31.169Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'QueryTranslations'.
      System.AggregateException: One or more errors occurred. (There is an error in XML document (8, 12).)
       ---> System.InvalidOperationException: There is an error in XML document (8, 12).
       ---> System.Xml.XmlException: There are multiple root elements. Line 8, position 12.
         at System.Xml.XmlTextReaderImpl.Throw(Exception e)
         at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
         at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
         at System.Xml.XmlReader.ReadEndElement()
         at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderxliff.Read7_xliff(Boolean isNullable, Boolean checkType)
         at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderxliff.Read8_xliff()
         --- End of inner exception stack trace ---
         at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
         at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
         at ALStudio.Server.Services.TranslationService.<>c.<GetTranslationModel>b__10_11(String xlfPath)
         at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
         at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
         at System.Linq.Parallel.SpoolingTaskBase.Work()
         at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
      --- End of stack trace from previous location ---
         at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
         --- End of inner exception stack trace ---
         at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
         at System.Linq.Parallel.SpoolingTask.SpoolStopAndGo[TInputOutput,TIgnoreKey](QueryTaskGroupState groupState, PartitionedStream`2 partitions, SynchronousChannel`1[] channels, TaskScheduler taskScheduler)
         at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
         at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
         at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
         at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
         at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
         at System.Linq.Parallel.QueryOpeningEnumerator`1.OpenQuery()
         at System.Linq.Parallel.QueryOpeningEnumerator`1.MoveNext()
         at System.Linq.ParallelEnumerable.ToList[TSource](ParallelQuery
[AL Studio][2020-12-01T17:28:31.169Z][Debug]: `1 source)
         at ALStudio.Server.Services.TranslationService.GetTranslationModel(IEnumerable`1 paths)
         at ALObjectDesigner.Library.ALObjectCollectorCacheService.GetTranslation(Boolean reload)
         at ALStudio.Server.ALStudioHub.QueryTranslations(IEnumerable`1 paths)
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteMethod(ObjectMethodExecutor methodExecutor, Hub hub, Object[] arguments)
         at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass16_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()

An unexpected error occurred invoking 'QueryDashboard' on the server. ArgumentNullException: Value cannot be null. (Parameter 'source')

Just when I open my workspace, I always get this (it's the big multiroot workspace)

[AL Studio][2020-10-19T07:37:43.306Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
Failed to invoke hub method 'QueryDashboard'.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector)
at ALStudio.Server.Services.ALObjectService.<>c__DisplayClass19_0.b__0(ALProject s)
at System.Linq.Enumerable.SelectListIterator2.ToArray() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.ToList()
at ALStudio.Server.Services.ALObjectService.GetDashboardModel()
at ALStudio.Server.ALStudioHub.QueryDashboard()
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments) at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.<>c__DisplayClass13_0.<g__ExecuteInvocation|0>d.MoveNext()

Opening page designer fails

Hi @martonsagi

Used version: v0.9.868

I'm having troubles using the page designer (both on existing objects and on newly created ones). If I click on any page in the "object designer" it fails with below error message.

image

The same happens when I'm using the "New" --> "Page" action from the main window:

image

I tested it in an existing workspace and on a newly created one (just used "AL: Go" for a blank app).

Are there any debug-information I can share to help you find the problem?

Cheers
Simon

An unexpected error occurred invoking 'QueryTableDesign'

When openen a Page Designer:

[AL Studio][2020-10-08T20:15:32.969Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'QueryPageDesign'.
System.FormatException: Input string was not in a correct format.
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
   at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at ALObjectParser.Library.ALTable.<>c.<ProcessSections>b__21_0(IALSection s)
   at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.GetEnumerator()+MoveNext()
   at System.Linq.Enumerable.SelectIPartitionIterator`2.ToList()
   at ALStudio.Server.Services.ALObjectService.UpdatePageFields(ALPage page)
   at ALStudio.Server.Services.ALObjectService.GetPageDesign(SymbolData info, Boolean skipSourceTable)
   at ALStudio.Server.ALStudioHub.QueryPageDesign(SymbolData info)
   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)
   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass13_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()


```



```
[AL Studio][2020-10-08T20:17:06.982Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
      Failed to invoke hub method 'QueryPageDesign'.
System.FormatException: Input string was not in a correct format.
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
   at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at ALObjectParser.Library.ALTable.<>c.<ProcessSections>b__21_0(IALSection s)
   at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.GetEnumerator()+MoveNext()
   at System.Linq.Enumerable.SelectIPartitionIterator`2.ToList()
   at ALStudio.Server.Services.ALObjectService.UpdatePageFields(ALPage page)
   at ALStudio.Server.Services.ALObjectService.GetPageDesign(SymbolData info, Boolean skipSourceTable)
   at ALStudio.Server.ALStudioHub.QueryPageDesign(SymbolData info)
   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)
   at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass13_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()
```

Cannot open Page Actions Source

Using the Actions overview of a page (e.g. of page Posted Sales Invoices), and placing the cursor of an arbirary action below, it is not possible to run action "Source":

Application_1.Application.objectList.find is not a function

image

Backend connection lost

I have opened a 17.1 Base Application repository, did not wait until everything was loaded but opened an object instead, when suddenly the following messages appeared in an endless (?) loop:
image
(please also note the highlighted typo).

Unfortunately I cannot provide any real repro scenario; but just in case you have an idea where to look at, or if me or anyone else can add a repro ...

Collapse all

I'm working multiroot a lot. It would be awesome to be able to collapse all in:
the workspaces
image

the projects:
image

Tables Key List - Enabled property

Hi team,

Don't know if this is a issue but makes me confusion when looking the keys of a table, see example below:

Table 37 - Key 2 when we look it appears that is enabled.
image

But if we look the source code, the enabled = false.
image

I look into the other keys and it looks like that on key list this property is showing the opposite value. If enabled = true shows false, if enabled = false shows true.

This is just a remark but i think that makes some confusion when we search for keys using the key list.

Thanks

Translation

Load translation from excel file which is exported from AL Studio
we are exporting the translation file to excel after then we are editing this file and we need to upload it in to VS Code.

An unexpected error occurred invoking 'QueryDashboard' on the server. ArgumentNullException: Value cannot be null. (Parameter 'source')

Just when I open my workspace, I always get this (it's the big multiroot workspace)

[AL Studio][2020-10-19T07:37:43.306Z][Debug]: fail: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[8]
Failed to invoke hub method 'QueryDashboard'.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector)
at ALStudio.Server.Services.ALObjectService.<>c__DisplayClass19_0.b__0(ALProject s)
at System.Linq.Enumerable.SelectListIterator2.ToArray() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.ToList()
at ALStudio.Server.Services.ALObjectService.GetDashboardModel()
at ALStudio.Server.ALStudioHub.QueryDashboard()
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments) at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.<>c__DisplayClass13_0.<g__ExecuteInvocation|0>d.MoveNext()

Cannot open Layout (RDLC) of my own *.rdlc files

I am developing an extension depending on the Base Application.

AL Home Screen:

  1. When I navigate to a standard RDLC report, e.g. 205 Order Confirmation, and then choose "Layout (RDLC)", the Report Builder will open and display the layout as expected.

  2. When I copy this standard report + rdlc file to my workspace, AL Studio can open its layout as well.

  3. But when I create a new report + rdlc layout, then I cannot open it: Failed to open file 'name.rdlc'.
    This is the same error I would get when trying to open ANY rdlc file externally with Report Builder, also the working standard ones.
    (I would need to rename the file into *.rdl. This is what the docs instruct anyway: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-howto-rdl-report-layout#create-an-rdl-layout-report )

However, I am wondering why then AL Studio is able to open the RDLC files, except my own? I tried to find any relevant differences between both workspace reports, but so far without any success.

Designer is not always updated on external file changes

Affected: Table/Page/Enum Designers.

Repro: when the designer have to handle more than one file, only the first attached file is being tracked that we used to initiate the designer.

Expected behaviour: designers should reload when any of the related files are changed outside of the designer scope.

Add "scanWorkspace"-function to Api

Hi Marton,
currently you're offering these two functions regarding the scanning of the workspace:
isWorkspaceScanned: boolean;
onWorkspaceScanned: Function | undefined;

Would it be possible to add a function "scanWorkspace" in case someone has set this setting?
"alStudio.advanced.skipInitialScan": true
but another extension developer would love to use your API? 😄

Problem with Translation Manager

Hi @martonsagi

Used version: v0.9.934

I'm having trouble using the Translation Manager with a specific combination of files. I have a *.g.xlf file and a *.de-DE.xlf file. When I only open the Translation Manager with the *.g.xlf file in the folder it works, same if only the *.de-DE.xlf file exists (even though I cannot work on the translations then, because the source is empty). But if both files are in the folder I always get this error "WebSocket closed with status code: 1009 ()"

image

When I try to refresh afterwards if just shows "Cannot send data if the connection is not in the "Connected" State"

image

I'll attach you VS Codes Dev Tools output, hopefully this helps

[Extension Host] [2023-06-09T15:10:08.689Z] Debug: Starting HubConnection.
console.ts:137 [Extension Host] [2023-06-09T15:10:08.690Z] Debug: Starting connection with transfer format 'Text'.
console.ts:137 [Extension Host] [2023-06-09T15:10:08.690Z] Debug: Sending negotiation request: http://localhost:30000/alstudio/negotiate?negotiateVersion=1.
console.ts:137 [Extension Host] No script files found.
console.ts:137 [Extension Host] Start watching workspace for new script files.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.163Z] Debug: Selecting transport 'WebSockets'.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.255Z] Information: WebSocket connected to ws://localhost:30000/alstudio?id=SsT9bXUapJU41JOkoe--Vw.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.255Z] Debug: The HttpConnection connected successfully.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.255Z] Debug: Sending handshake request.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.257Z] Information: Using HubProtocol 'json'.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.308Z] Debug: Server handshake complete.
console.ts:137 [Extension Host] [2023-06-09T15:10:09.309Z] Debug: HubConnection connected successfully.
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:10:09.465Z][Info]: Extension "dynasist.al-studio" is now activated.
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:14:34.618Z][Info]: Workspace processed in 5693ms
bundle.js:270 
e {vscode: {…}}
 
{start: 'translation-manager', options: {…}, settings: {…}}
console.ts:137 [Extension Host] [2023-06-09T15:14:41.749Z] Debug: HttpConnection.stopConnection(Error: WebSocket closed with status code: 1009 ().) called while in state Connected.
log.ts:441   ERR [Extension Host] [2023-06-09T15:14:41.749Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1009 ().'.
console.ts:137 [Extension Host] [2023-06-09T15:14:41.749Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1009 ().'.
console.ts:137 [Extension Host] [2023-06-09T15:14:41.749Z] Debug: HubConnection.connectionClosed(Error: WebSocket closed with status code: 1009 ().) called while in state Connected.
console.ts:137 [Extension Host] [2023-06-09T15:14:41.749Z] Information: Connection reconnecting because of error 'Error: WebSocket closed with status code: 1009 ().'.
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:14:41.750Z][Warning]: Backend connection lost due to error "Error: WebSocket closed with status code: 1009 ().". Reconnecting.
console.ts:137 [Extension Host] [2023-06-09T15:14:41.750Z] Information: Reconnect attempt number 1 will start in 3000 ms.
notificationsAlerts.ts:42 WebSocket closed with status code: 1009 ().
log.ts:441   ERR [Extension Host] [AL Studio][2023-06-09T15:14:41.750Z][Error]: Failed to execute command: LoadTranslations Error: WebSocket closed with status code: 1009 ().
	at t.close (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:43412)
	at s.onclose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:42511)
	at S.i (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:28980)
	at S.emit (node:events:526:28)
	at S.emitClose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:13554)
	at Socket.M (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:16721)
	at Socket.emit (node:events:526:28)
	at TCP.<anonymous> (node:net:687:12)
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:14:41.750Z][Error]: Failed to execute command: LoadTranslations Error: WebSocket closed with status code: 1009 ().
	at t.close (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:43412)
	at s.onclose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:42511)
	at S.i (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:28980)
	at S.emit (node:events:526:28)
	at S.emitClose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:13554)
	at Socket.M (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:16721)
	at Socket.emit (node:events:526:28)
	at TCP.<anonymous> (node:net:687:12)
[Extension Host] [2023-06-09T15:14:44.756Z] Debug: Starting connection with transfer format 'Text'.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.756Z] Debug: Sending negotiation request: http://localhost:30000/alstudio/negotiate?negotiateVersion=1.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.766Z] Debug: Selecting transport 'WebSockets'.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.775Z] Information: WebSocket connected to ws://localhost:30000/alstudio?id=jnu00Q9XYbFm-CISuJru0Q.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.775Z] Debug: The HttpConnection connected successfully.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.775Z] Debug: Sending handshake request.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.776Z] Information: Using HubProtocol 'json'.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.778Z] Debug: Server handshake complete.
console.ts:137 [Extension Host] [2023-06-09T15:14:44.778Z] Information: HubConnection reconnected successfully.
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:14:44.778Z][Info]: Backend connection has beed restored.
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:14:46.227Z][Info]: Workspace processed in 1447ms
console.ts:137 [Extension Host] [2023-06-09T15:14:53.900Z] Debug: HttpConnection.stopConnection(Error: WebSocket closed with status code: 1009 ().) called while in state Connected.
log.ts:441   ERR [Extension Host] [2023-06-09T15:14:53.900Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1009 ().'.
console.ts:137 [Extension Host] [2023-06-09T15:14:53.900Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1009 ().'.
console.ts:137 [Extension Host] [2023-06-09T15:14:53.900Z] Debug: HubConnection.connectionClosed(Error: WebSocket closed with status code: 1009 ().) called while in state Connected.
console.ts:137 [Extension Host] [2023-06-09T15:14:53.900Z] Information: Connection reconnecting because of error 'Error: WebSocket closed with status code: 1009 ().'.
console.ts:137 [Extension Host] [AL Studio][2023-06-09T15:14:53.900Z][Warning]: Backend connection lost due to error "Error: WebSocket closed with status code: 1009 ().". Reconnecting.
console.ts:137 [Extension Host] [2023-06-09T15:14:53.901Z] Information: Reconnect attempt number 1 will start in 3000 ms.
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: WebSocket closed with status code: 1009 ().
console.ts:137 [Extension Host] stack trace: Error: WebSocket closed with status code: 1009 ().
	at t.close (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:43412)
	at s.onclose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:42511)
	at S.i (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:28980)
	at S.emit (node:events:526:28)
	at S.emitClose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:13554)
	at Socket.M (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:16721)
	at Socket.emit (node:events:526:28)
	at TCP.<anonymous> (node:net:687:12)
mainThreadExtensionService.ts:80 [[object Object]]WebSocket closed with status code: 1009 ().
mainThreadExtensionService.ts:81 Error: WebSocket closed with status code: 1009 ().
	at t.close (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:43412)
	at s.onclose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\@microsoft\signalr.js:1:42511)
	at S.i (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:28980)
	at S.emit (node:events:526:28)
	at S.emitClose (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:13554)
	at Socket.M (c:\Users\simonofhh\.vscode\extensions\dynasist.al-studio-0.9.934\out\node_modules\ws.js:1:16721)
	at Socket.emit (node:events:526:28)

This repeats every 3 seconds. Any idea what I can do? I already tried downgrading to the previous version, re-installing completely, rebooting. Nothing changes.

Thanks for your help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.