Solved

Can you show me the Roots of HTML Editor INSERT Datafields data in Notification Templates (SM204003)?

  • 1 March 2022
  • 6 replies
  • 189 views

Userlevel 3
Badge +1

Hi guys

 

How can I find roots of insert data fields in HTML editor  Like Notification Template form.

If not able to find existing screen roots.

let me know how to add /arrange DataFields in Insert button of HTML Editor in my screen.

I found graph(SMNotificationMaint) name but its content is not visible 

Thank you all

icon

Best answer by ShahidaValiSyed04 14 April 2022, 11:09

View original

6 replies

Userlevel 4
Badge

Hi @ShahidaValiSyed04 

The data fields you can use in your Notification Template are based on the Screen you select for your Notification Template:

 

 

Since this Notification Template is based on the Sales Orders screen, the fields you have access to depend on what is available on that screen.

I don’t think they are meant to be re-arranged in the data fields view, however if you want more control over what is or is not available (as well as a simplified tree layout), you can try using a Generic Inquiry as the screen for your Notification Template instead of a data entry screen like Sales Orders:

 

 

If you opt for using a Generic Inquiry, you will get access to all the fields that were exposed under the Results Grid tab of the Generic Inquiries screen:

 

 

Userlevel 6
Badge +5

I don’t have much experience with the notification templates but I believe those are pulled from the views defined on the graph of the screen. If you are trying to add a specific field I would guess it only pulls fields with a PXUIField attribute.

That being said you may be able to use (([ViewName].[FieldName])) even if the field is not listed in the insert panel. 

Userlevel 3
Badge +1

Hi @stephenbologna39  I want to use same setup in my new screen

can you suggest me how can I use the existing screen functionality on my own screen.

Userlevel 4
Badge

Hi @ShahidaValiSyed04 

I’m not sure I completely understand your question, but let me offer you this.

You can change the screen the Notification Template is tied to, however you will always only have access to the fields in that screen.  If you are looking to combine the available fields from two or more distinct screens, I don’t think that is possible.

If you want a completely customized fieldset in your Notification Template, the only way I know to do that would be to create a Generic Inquiry and explicitly expose the fields you want to include.

Userlevel 3
Badge +1

Hi @stephenbologna39 

What changes I have to do in Generic Inquiry to get Data Fields in html based on screen I selected?????

Thanks

 

Userlevel 3
Badge +1

I have founded How the  HTML Editor INSERT Datafields are working

I hope this may help you 

Thanks,

Shahidavali

Follow below process

  1. In the screen you want to show datafields graph changes have given below 
  2. First you have to get how many screens of data you needed at datafields
 public static System.Type GetRecordSystemType(string agreeType)
{
System.Type recType = null;

switch (agreeType)
{

case SSP.Helper.Constant.Opportunity:
recType = typeof(PX.Objects.CR.CROpportunity);
break;

case SSP.Helper.Constant.ServiceOrder:
recType = typeof(PX.Objects.FS.FSServiceOrder);
break;

case SSP.Helper.Constant.Projects:
recType = typeof(PX.Objects.PM.PMProject);
break;

case SSP.Helper.Constant.ChangeOrders:
recType = typeof(PX.Objects.PM.PMChangeOrder);
break;

case SSP.Helper.Constant.PurchaseOrders:
recType = typeof(PX.Objects.PO.POOrder);
break;

case SSP.Helper.Constant.CustomerContracts:
recType = typeof(PX.Objects.CT.Contract);
break;

case SSP.Helper.Constant.ServiceContracts:
recType = typeof(PX.Objects.FS.FSServiceContract);
break;

default:
// SSSTODO: Throw Exception!!!
break;
}

return recType;
}
  1. You should have reference field In the main screen or  you can skip and you can give same screen Datafield as showen in the above cases as your wish.
     [PXViewName("Entity Fields")]
    [PXCopyPasteHiddenView]
    public PXSelectOrderBy<CacheEntityItem, OrderBy<Asc<CacheEntityItem.number>>> EntityItems;

    protected virtual System.Collections.IEnumerable entityItems([PXString] string parent)
    {
    if (Agreements.Current == null) return new CacheEntityItem[0];
    System.Type recType = SSPAgreementMaint.GetRecordSystemType(Agreements.Current.AgreeType);

    if (recType != null)
    {
    return EMailSourceHelper.TemplateEntity(this, parent, recType.FullName, null);
    }
    else
    {
    return new CacheEntityItem[0];
    }


    }
  2. In the .aspx page Had to add "DataTrees" section
  1. Remove Previousdatafield element (set AllowInsertPrevParameter = false)
  2. Made InsertDatafield section exactly as showen in the below.

<InsertDatafield TextField="Name" ValueField="Path" DataSourceID="ds" ImageField="Icon" DataMember="EntityItems"></InsertDatafield>

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