General X++ Development
How do I read Infolog messages in X++?
How do I read Infolog messages in X++?
1 answer
Write an answerYou can inspect the Infolog data with SysInfologEnumerator.
SysInfologEnumerator enumerator =
SysInfologEnumerator::newData(infolog.infologData());
while (enumerator.moveNext())
{
SysInfologMessageStruct message =
new SysInfologMessageStruct(enumerator.currentMessage());
info(message.message());
}This is useful when you genuinely need to inspect or capture messages programmatically.
I would not use it just to read every Infolog message and then write the exact same messages back to the Infolog again.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer