Skip to main content
Question

Display Markdown Text

  • April 29, 2026
  • 6 replies
  • 81 views

Forum|alt.badge.img

Is there a way to display formatted markdown text in Acumatica?  I can get html or markdown results from the API that I’m calling, but don’t know how to display the results to the user.
 

 

6 replies

Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 29, 2026

My problem is that the RichTextBox from the aspx is generating an error:

undefined: Cannot read properties of undefined (reading 'getValue')

Here is my code:

   <pxa:PXRichTextEdit ID="CstPXTextEdit5" runat="server" 
            Style="z-index: 113; border-width: 0px;"
            AllowAttached="true" AllowSearch="true" AllowLoadTemplate="false" AllowSourceMode="true"
            DataField="Answer" Width="800" Height="900">
            <ContentStyle BorderStyle="None" ></ContentStyle>
            <AutoSize Enabled="True" ></AutoSize>
        </pxa:PXRichTextEdit>


VishalSrinivasan80
Community Manager

Hey! Thanks for sharing this. Could you walk us through what you're trying to build? What is the API you're calling, what triggers the call, and where in Acumatica (for eg: which screen?) are you trying to show the response to the user?


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 30, 2026

Hey! Thanks for sharing this. Could you walk us through what you're trying to build? What is the API you're calling, what triggers the call, and where in Acumatica (for eg: which screen?) are you trying to show the response to the user?

The API is a custom DLL - the user triggers the call with a button click on a custom screen… and the call works.  I’m having trouble getting a RichText box what doesn’t pop up “undefined: Cannot read properties of undefined (reading 'getValue')” - I’ve seen this on the forums (2 years ago), but the best answer includes aspx code for an additional field…  

 


 <px:PXRichTextEdit ID="edBody" runat="server" DataField="UsrBody" Style="border-width: 0px; border-top-width: 1px; width: 100%;"
         AllowAttached="true" AllowSearch="true" AllowLoadTemplate="false" AllowSourceMode="true">
         <AutoSize Enabled="True" MinHeight="216" />
         <LoadTemplate TypeName="PX.SM.SMNotificationMaint" DataMember="Notifications" ViewName="NotificationTemplate" ValueField="notificationID" TextField="Name" DataSourceID="ds" Size="M" />
     </px:PXRichTextEdit>

Does this not reference two fields?


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 30, 2026

undefined: Cannot read properties of undefined (reading 'getValue')

PX.ScriptBatch.axd:283

  window.alert @

Forum|alt.badge.img+8
  • Captain II
  • April 30, 2026

Can you share your DAC?


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 30, 2026

using System;
using System.Threading.Tasks;
using PX.Data;
using PX.Data.BQL;

namespace RichTextDemo
{
    public class RichTextDemoGraph : PXGraph<RichTextDemoGraph>
    {
        public PXFilter<AskQuestionFilter> Document;
        public PXAction<AskQuestionFilter> AskQuestion;

        [PXButton(CommitChanges = true)]
        [PXUIField(DisplayName = "Ask Question")]
        protected virtual void askQuestion()
        {
            if (string.IsNullOrEmpty(Document.Current.Question))
            {
                Document.Current.Answer = "Please enter a question.";
            }
            else
            {
                // Call to External DLL goes here...
                string response = "Some <b>HTML</b> Response.";  
                Document.Current.Answer = response;
            }
            Document.Update(Document.Current);
        }
    }

    [Serializable]
    [PXCacheName("Fortiva Demo")]
    public class AskQuestionFilter : PXBqlTable, IBqlTable
    {
        #region Question
        [PXString(1000)]
        [PXUIField(DisplayName = "Question")]
        public string Question { get; set; }
        public abstract class question : BqlString.Field<question> { }
        #endregion

        #region Answer
        [PXString(IsUnicode = true)]
        [PXUIField(DisplayName = "Answer", Enabled = false)]
        public string Answer { get; set; }
        public abstract class answer : BqlString.Field<answer> { }
        #endregion
    }
}