Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
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

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 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,156 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,421 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,156 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,156 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,421 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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans