martonsagi / al-object-designer

AL Object Designer for Dynamics 365 Business Central development
MIT License
40 stars 21 forks source link

Eventsubscriber - Discovering Objects #45

Closed cosmo-skol closed 5 years ago

cosmo-skol commented 5 years ago

Hello martonsagi,

we are currently using version 0.1.0 of your extension, but can't seem to get it working properly. The object discovery stops at the first object with an event-subscriber. If we remove the event-subscriber the discovery works for this object, but not the next object with an subscriber. I've attached an standard codeunit with this behaviour and the developer-log from vscode to help you narrow it down. It seems to be an error with an replace-statement in ALObjectParser.ParseEventMethodHeader.

Have a great week and best regards, cosmo-skol

ALObjectDesignerTest.zip

martonsagi commented 5 years ago

Hi,

Thanks for the details and example!

[EventSubscriber(ObjectType::Codeunit, 41, 'OnResolveDateFilterToken', '', false, false)] Issue was with Object ID 41 declaration instead of having codeunit::[name] format. Since the BaseApp is full of it, can't do much but handle this. :)

Fixed 0.1.1 version has been published to the Marketplace, your VSCode should update it automatically.

Thanks! Marton