Question

Using PXRichTextEdit and getting Insert \ Datafield to work

  • 30 March 2022
  • 0 replies
  • 67 views

Not going into a long discussion of what I’m doing - but basically I need to add something similar to Notification Templates where user can specify text with the ((Fieldname)) syntax off a graph in a PXRichTextEdit box.

I’ve got the code working that if I manually type in the syntax, I can do the replacements and it’s all great.  However, I can’t get the Insert\Datafield option to show the values from the graph.

 

        <px:PXRichTextEdit AllowInsertPrevParameter="False" AllowInsertParameter="True" AllowLoadTemplate="False" AllowSourceMode="True" AllowSearch="True" AllowPlaceholders="True" AllowMacros="True" AllowAttached="True" textmode="MultiLine" Height="100" Width="100%" runat="server" ID="edHeader" DataField="Header" Style="border-width: 0px; border-top-width: 1px; width: 100%;">
          <AutoSize Enabled="True" MinHeight="216" ></AutoSize>
          <InsertDatafield TextField="Header" ValueField="Path" DataSourceID="ds" ImageField="Icon" DataMember="EntityItems"></InsertDatafield>
        </px:PXRichTextEdit>
 

 

In the Graph, I’ve added both what’s below and tried the commented out line as well, to no avail (copied from other screens that work).  Anyone know what else might be required in the .aspx or Graph in order to get the Insert\Datafield to work?

 

        protected virtual System.Collections.IEnumerable entityItems([PXString] string parent)
        {
            if (MasterView.Current == null) return new CacheEntityItem[0];
            return EMailSourceHelper.TemplateEntity(this, parent, typeof(PX.Objects.CR.CROpportunity).FullName, typeof(PX.Objects.CR.OpportunityMaint).FullName);
            //var ret = EMailSourceHelper.TemplateEntity(this, parent, typeof(PX.Objects.CR.Contact).FullName, null);
            //return ret;
        }


0 replies

Be the first to reply!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved