DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Create event publishers in different object #99

Closed NKarolak closed 3 years ago

NKarolak commented 3 years ago

Addition to #50:

"Create [Integration/Businsess]Event Publisher ..." is not implemented if you intend to create the procedure in another object.

Example: Working: OnMyNewFunction()

Not working: AnotherCodeunitVariable.OnMyNewFunction()

Use case (thread): https://twitter.com/KarolakNatalie/status/1334783180151394305?s=20

The new event publisher needs to be declared as internal (not global, not local).

NKarolak commented 3 years ago

Oops sorry, you've created that yourself already in #93

DavidFeldhoff commented 3 years ago

Haha, yes, I already noticed the same gap. And as I saw your post I felt confirmed. I'll for sure add this.

Do you think I should change the access modifier in new procedures as well for other procedures: AnotherCodeunitVariable.MyNewFunction ? Or should there be a quick pick to choose in general between: global, local, internal, protected 🤔 (This is a quick pick: link)

NKarolak commented 3 years ago

I prefer to keep it simple. No menu, no setup. Whenever the procedure needs to be created in another object, then set it to internal.

DavidFeldhoff commented 3 years ago

Oh.. totally forgot to give you feedback on this :D Thanks for closing it yourself :)