microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
719 stars 242 forks source link

Find Event Procedure Name behaviour Change #7692

Closed mjmatthiesen closed 3 months ago

mjmatthiesen commented 3 months ago

Please include the following with each issue:

1. Describe the bug When using the find event functionality, events now get a prefix of object name with spaces and separated by an underscore, resulting in a procedure name that uses quotes. Quotes are generally considered to be an anti pattern in procedure names.

If you are introducing behavioural changes like this, then we really should have a config to disable them, especially because they may go against existing coding standards.

2. To Reproduce Steps to reproduce the behaviour:

  1. Ensure you have the 13.0 release installed.
  2. Go to Find Event (alt shift e)
  3. select any event
  4. get the following
[EventSubscriber(ObjectType::Codeunit, Codeunit::"CDS Int. Table Couple", 'OnBeforeRun', '', false, false)]
local procedure "CDS Int. Table Couple_OnBeforeRun"(IntegrationTableMapping: Record "Integration Table Mapping"; var Handled: Boolean)
begin
end;

Note the object prefix CDS Int. Table Couple_ that was added to the event, now requiring the procedure name to be wrapped in quotes.

3. Expected behaviour Should produce a procedure as follows:

[EventSubscriber(ObjectType::Codeunit, Codeunit::"CDS Int. Table Couple", 'OnBeforeRun', '', false, false)]
local procedure OnBeforeRun(IntegrationTableMapping: Record "Integration Table Mapping"; var Handled: Boolean);
begin
end;

4. Actual behaviour A procedure name that really should be invalid.

5. Versions:

Final Checklist

Please remember to do the following:

dannoe commented 3 months ago

see https://github.com/microsoft/AL/issues/7609 and this https://github.com/microsoft/AL/issues/7423

mjmatthiesen commented 3 months ago

see #7609 and this #7423

Old issues which per guidelines recommend opening a new issue. So here we are.

BazookaMusic commented 3 months ago

This was added to ensure uniqueness after previous requests as mentioned. I will add this for triage to discuss if it should be configurable via some setting.

mjmatthiesen commented 3 months ago

It would really be appreciated. This approach was implemented based on a single suggestion that then was applied to everyone.

Meanwhile, this new approach falls out of code standards because it uses quotes. This means our devs have to alter it every single time now. A configuration similar to what the second comment suggested would be very worthwhile as it could easily be set with our default project config or vs code config.

qutreson commented 3 months ago

We discussed this and decided to close this issue. We recommend that you post this suggestion on having settings to configure the Find Event suggestions on our Ideas forum at aka.ms/BCIdeas. We are constantly monitoring top ideas and will consider them for a future release.

mjmatthiesen commented 3 months ago

We discussed this and decided to close this issue. We recommend that you post this suggestion on having settings to configure the Find Event suggestions on our Ideas forum at aka.ms/BCIdeas. We are constantly monitoring top ideas and will consider them for a future release.

Here it is then: https://experience.dynamics.com/ideas/idea/?ideaid=2c346c33-8cf2-ee11-a73d-6045bdb71da1

mjmatthiesen commented 2 months ago

Here it is then: experience.dynamics.com/ideas/idea/?ideaid=2c346c33-8cf2-ee11-a73d-6045bdb71da1

This idea already has more upvotes than the original suggestion now.