The may be occasions where you wish to access Clever Comments from an external application. To do this, it is possible to create an API page to access Clever Comments through an API. The following example demonstrates this for Customer Comments:

page 50000 "API Customer Comments"
{
    PageType = API;

    APIVersion = 'v1.0';
    APIPublisher = 'publisherName';
    APIGroup = 'apiGroup';

    EntityCaption = 'customerComment';
    EntitySetCaption = 'customerComments';
    EntityName = 'retrieveCustomerComment';
    EntitySetName = 'retrieveCustomerComments';

    SourceTable = "Comment Line";
    SourceTableView = where ("Table Name" = Const(Customer));

    InsertAllowed = false;
    ModifyAllowed = false;
    DeleteAllowed = false;
    Extensible = false;

    layout
    {
        area(content)
        {
            repeater(Group)
            {
                field(customerCode; rec.Code)
                {
                }
                field(dateFrom; rec."Date From CCMTTMN")
                {
                }
                field(dateTo; rec."Date To CCMTTMN")
                {
                }
                field(importance; rec."Comment Importance CCMTTMN")
                {
                }
                field(commentAsHtml; RetrieveCommentAsHtml(rec."Comment Text ID CCMTTMN"))
                {
                }
                field(commentAsPlainText; RetrieveCommentAsPlainText(rec."Comment Text ID CCMTTMN"))
                {
                }
            }
        }
    }

    local Procedure RetrieveCommentAsHtml(CommentTextID: Guid): Text
    var
        CommentText: Record "Comment Text CCMTTMN";
        Instr: Instream;
        Comment: Text;
    begin
        If CommentText.Get(CommentTextID) then begin
            CommentText.CalcFields(Instruction);
            CommentText.Instruction.CreateInStream(Instr);
            Instr.Read(Comment);
        end;
        exit(Commet);
    end;
   
    local Procedure RetrieveCommentAsPlainText(CommentTextID: Guid): Text
    var
        CommentUtility: Codeunit "Comment Utility CCMTTMN";
        CommentText: Text;
    begin
        CommentText := RetrieveCommentAsHtml(CommentTextID);
        Exit(CommentUtility.StripHtmlTags(CommentText));
    end;
}

Clever comments are stored as HTML. The example demonstrates how to retrieve the comments as both HTML and plain text.

This example can be adapted for any comment type in Business central by substituting the references to 'Comment Line' with the standard comment table that holds the comments for the required entity.