Skip to main content
Question

Using PXRichTextEdit and getting Insert \ Datafield to work


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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings