Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Free notes with carriage return

Posted on by 135

In Accounts Receivable I'm using the Free Notes.

For example I have few notes for an invoice, though when printed the notes are not separated by a blank row, making it messy to read.

In the form it appears to be impossible to add a carriage return to create the a Note with basically two lines one with text and one empty.


Any suggestion on how to achieve it?

If possible, I would prefer to avoid to recreate all the notes, and prefer to modify the existing ones.

Thanks

Regards

Categories:
  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Free notes with carriage return

    I don't have such thing in my menu (AX2012 R3).

  • Sjoe Profile Picture
    Sjoe 135 on at
    RE: Free notes with carriage return

    won't work.

    The form is in Account Receivables - Setup - Free Notes - Customers free notes setup

  • Sjoe Profile Picture
    Sjoe 135 on at
    RE: Free notes with carriage return

    tried but it considers it as a text to be printed as part of the note

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Free notes with carriage return

    Ah, then Shift-Enter might work just like in Excel.

    Is this some customized form? I don't see such form in my system. I see just Form notes and there I can add line breaks in the notes by hitting enter.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: Free notes with carriage return

    Hi Sjoe,

    Can you try adding "\n" at the end of the text?

  • Sjoe Profile Picture
    Sjoe 135 on at
    RE: Free notes with carriage return

    The form where to enter the free notes doesn't allow me to hit enter twice. At first enter it considers my editing of the note complete

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Free notes with carriage return

    Hitting enter ("carriage return") one or two times.

  • Sjoe Profile Picture
    Sjoe 135 on at
    RE: Free notes with carriage return

    How do you suggest I do it? Just trying to add the \r at the end of the text of the free note? Do you think AX is going to recognize it as a command rather then an additional text to add?

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Free notes with carriage return

    What if you add carriage returns in the end of your note texts?

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: Free notes with carriage return

    Hi Sjoe,

    This will need you to make a code change at a couple of pleaces -

    The notes for Sales Invoice are being generated from SalesInvoiceBaseDP\getDocumentNote -

    pastedimage1599730440895v1.png

    Since Docu::concatDocumentNote will be used in a lot of places. I would suggest creating a new method under Classes\Docu -

    static Notes concatDocuRefNotesBlankLine(DocuRefSearch _search)
    {
        DocuRef     docuRef;
        Notes       result;
        #xppTexts
    
        if (_search)
        {
            docuRef.recordLevelSecurity(true);
            while (_search.next())
            {
                if (result)
                {
                    result  = #newline;
                    result  = #newline;
                }
                result  = _search.docuRef().Notes;
            }
        }
    
        return result;
    }
    

    You can now call this method from the same place replacing the old line like this -

    notes = Docu::concatDocuRefNotesBlankLine(docuRefSearch);

    This should insert the blank line as you need.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans