I would like to vote for a new function, accessible from AL called GETCALLSTACK.

The function should be similar to GETLASTERRORCALLSTACK, but then accessible whenever needed, without throwing an Error first.

When using events, it would be very benificial to find out from where the event was originated through the callstack.

Or sometimes a procedure is called in different process and we only would know the source process by having the callstack availbable.

In my opinion the format of the callstack could even improved that we would get a JSON format with more details...

And using a TryFunction with explicit Error and then GETLASTERRORCALLSTACK is not the right way to go from my opinion.

Related github issues:

  • https://github.com/microsoft/AL/issues/2019
  • https://github.com/microsoft/ALAppExtensions/issues/15497
Category: Development
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team