Cumulative Update 4: MESSAGE function does not work as expected

At iFacto, we try to keep our product as up to date as possible. Which means that when there are some problems in the Cumulative Updates, we run into them fairly early.

As such, I have found a situation where the MESSAGE does not work as we are used too.

Update: Apparently this isn’t actually an issue, but as it has always worked. Read the extended update below the post.

The easiest way to explain the problem is to show you a little sample.

Let’s review the code. We basically should expect the 3 examples to print line1, line2 and line 3 on a new line right?

Sample one, just puts all the text into the message directly, sample 2 uses % variables through the STRSUBSTNO, sample 3 just ditches the STRSUBSTNO and puts the % parameter values directly into the MESSAGE parameters.

Let’s look at the actual results:

NewLine_sample1 NewLine_sample2 NewLine_sample3

Was that what you were expecting?

It appears that the MESSAGE parameters is broken, which leads to backslashes not being interpreted as new lines.

I have already logged an incident at Microsoft. Hopefully, in the next Cumulative Update, the problem will be fixed.

For now, all we can do is either:

  • Ignore the problem
  • Ignore the Cumulative Update
  • Use concatenation
  • Use STRSUBSTNO

Update:

As guidorobben mentioned in his comment, this isn’t a new issue, but MESSAGE has always worked as this. Even after showing this initially to some colleagues, none of us had actually noticed that it has always been like this.

So, it appears that this post is no longer a bug report, but a description of how the MESSAGE works with backslash.

3 thoughts on “Cumulative Update 4: MESSAGE function does not work as expected

    • Hello Guido,

      It seems you are actually right, and this isn’t an issue that was introduced with CU4. I guess that no one is too old to learn behavior as it has always been. ๐Ÿ™‚

      Anyway, I’ll put an update on the blogpost. Thanks for mentioning this!

      Magno

Leave a Reply