Notes display only first 65 characters when created with code

  • Notes display only first 65 characters when created with code

    Posted by genns@technicalprospects.com on September 4, 2018 at 1:47 pm
    • Greg Enns

      Member

      September 4, 2018 at 1:47 PM

      We use code to auto-generate some notes on documents.
      Longer notes are not displayed in their entirety–with the limit seeming to be around 60-65 characters.
      I can use Jet to look at the note as it is stored in the database…The note is there in it’s entirety (131 characters)! Why won’t NAV show me the whole note in the UI?
      I can copy/paste MUCH longer than that in the UI and it shows up fine.

      The essentials of the code for the note creation are:
      RecLink.Note.CREATEOUTSTREAM(OutStream1);
      OutStream1.WRITETEXT(MessageText);
      RecLink.Created := CURRENTDATETIME;
      RecLink.”User ID” := USERID;
      RecLink.Company := COMPANYNAME;
      RecLink.INSERT(TRUE);

      (This is NAV 2016.)
      ——————————
      Greg Enns
      ERP Coordinator
      Technical Prospects
      Kaukauna WI
      ——————————

    • Suresh Kulla

      Member

      September 4, 2018 at 2:09 PM

      Greg,Ā 

      I am not sure if that is the reason but try encoding the text before assigning it. Check the function in my blog post

      http://www.navisionworld.com/2015/11/how-to-readwrite-notes-in-navision.html

      ——————————
      Thanks
      Suresh Kulla
      NAV Technical Architect
      Atlanta GA
      ——————————
      ——————————————-

    • Greg Enns

      Member

      September 4, 2018 at 3:08 PM

      Unfortunately no–that didn’t fix it. Thanks for the idea though–definitely worth a shot.

      ——————————
      Greg Enns
      ERP Coordinator
      Technical Prospects
      Kaukauna WI
      ——————————
      ——————————————-

    • Mark Hamblin

      Member

      September 5, 2018 at 3:16 AM

      Try this:

      RecLink.Note.CREATEOUTSTREAM(OutStream);
      BinStream := BinStream.BinaryWriter(OutStream, TextEncoder.UTF8);
      BinStream.Write(TextNoteHere);

      Where:
      BinStream is a DotNet variable of type System.IO.BinaryWriter
      TextEncoder is a DotNet variable of type System.Text.Encoding

      ——————————
      Mark Hamblin
      Insight Works
      Edmonton AB
      ——————————
      ——————————————-

    • Greg Enns

      Member

      September 6, 2018 at 9:40 AM

      Thanks Mark! That did it!

      ——————————
      Greg Enns
      ERP Coordinator
      Technical Prospects
      Kaukauna WI
      ——————————
      ——————————————-

    genns@technicalprospects.com replied 7 years ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Notes display only first 65 characters when created with code’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!