Skip to content

[Bug] AddMissingParentheses adds parentheses to function references in event subscribers (AL Runtime 11.x) #467

Description

@fvet

Since runtime version 11, the event subscriber syntax has changed from using text to reference a function, to using identifiers instead. However, when running the code cleanup with action AddMissingParentheses, the event subscribers on - wrongfully - updated with their parentheses.

More info: https://learn.microsoft.com/en-us/dynamics365/release-plan/2023wave1/smb/dynamics365-business-central/code-navigability-event-subscribers

Original source code

[EventSubscriber(ObjectType::Codeunit, Codeunit::"WMS Management", 'OnBeforeCreateWhseJnlLine', '', false, false)]

>> 'OnBeforeCreateWhseJnlLine'

After running code cleanup actions

[EventSubscriber(ObjectType::Codeunit, Codeunit::"WMS Management", OnBeforeCreateWhseJnlLine(), '', false, false)]

>> OnBeforeCreateWhseJnlLine()

To be

[EventSubscriber(ObjectType::Codeunit, Codeunit::"WMS Management", OnBeforeCreateWhseJnlLine, '', false, false)]

>> OnBeforeCreateWhseJnlLine

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions