'Navision Attain Hash 1.0'.BSTRConverter

I am tring to write an email notification option. I see that Navision uses the ‘Navision Attain Hash 1.0’.BSTRConverter to add to the email body. Is there a way to force a line feed in it?

Hi,

Yes you can do this by creating a Line Break character, i.e. a variable called gchrLineBreak of type Character:

Then write your code like this:

[…]

gchrLineBreak := 13; // Assigns char(13) value to char variable

REPEAT
BSTRConverterBody.AppendNextStringPortion(MessageBuffer.Body);
BSTRConverterBody.AppendNextStringPortion(FORMAT(gchrLineBreak));
UNTIL
MessageBuffer.NEXT = 0;

[…]

Where MessageBuffer is the table you are reading the lines from to populate your e-mail.

Hope this helps,

Chris