SM208000 - Generic Inquiry
At Generic Inquiry screen we have field “Row Style” which helps us creating GI styles due to our template.

I want to create a similar field that, instead of affecting the GI, applies to my custom table. I’ve managed to copy the field and its smart panel, and I even made it possible to select fields from my table. However, when I click OK, the style is not applied to the table.
Is it possible to implement this functionality? If so, how can I do it?
More details on what I have done:

The field and smart panel are similar to those on the Generic Inquiry screen. I copied the DAC field, its definition in the ASPX file, and also added my own method in the ASPX.cs file.
DAC field:
#region RowStyleFormula
public abstract class rowStyleFormula : BqlType<IBqlString, string>.Field<rowStyleFormula> {}
[PXDBString]
[PXUIField(DisplayName = "Row Style")]
public string RowStyleFormula { get; set; }
#endregionAspx:
<pxa:PXFormulaCombo ID="edRowStyleFormula" runat="server" DataField="RowStyleFormula" EditButton="True"
FieldsAutoRefresh="True" FieldsRootAutoRefresh="true" LastNodeName="Fields" IsInternalVisible="false"
IsExternalVisible="false" OnRootFieldsNeeded="edRowStyle_RootFieldsNeeded" CommitChanges="true"
SkinID="GI" IsStylesVisible="True">
</pxa:PXFormulaCombo>Aspx.cs file has this method as at SM208000 screen:
protected void edRowStyle_RootFieldsNeeded(object sender, PXCallBackEventArgs e)
{
MyGraphMaint graph = this.ds.DataGraph as MyGraphMaint;
if (graph != null)
{
String[] fields = graph.GetAllFields();
String[] parameters = graph.GetAllParameters();
e.Result = string.Join(";", parameters.Concat(fields));
}
}
I also implemented GetAllFields() and GetAllParameters(bool inBrackets = true) in the graph:
public string[] GetAllFields()
{
var list = new List<string>();
foreach (PXCache cache in this.Caches.Values)
{
foreach (string field in cache.Fields)
{
list.Add($"[{cache.GetItemType().Name}.{field}]");
}
}
list.Sort();
return list.ToArray();
}
public string[] GetAllParameters(bool inBrackets = true)
{
var list = new List<string>();
return list.ToArray();
}I haven’t fully implemented the GetAllParameters() method because I don’t completely understand what it does or its purpose. However, as far as I understand, it only affects the output in the Fields section of the smart panel, which I have already handled satisfactorily.

When I click the OK button, nothing happens. The style is saved to the database if I try to save the screen, but the table itself does not change in any way. Thank you in advance.