Hi,
I have a selector field defined like this at DAC level,
#region UsrSalesOfficesAP
[PXDBInt()]
[PXUIField(DisplayName = "Sales Office")]
[PXSelector(typeof(Search<TSSalesOffices.recordID>),
typeof(TSSalesOffices.salesOffice),
SubstituteKey = typeof(TSSalesOffices.recordID),
DescriptionField = typeof(TSSalesOffices.salesOffice),
Filterable = true)]
public virtual int? UsrSalesOfficesAP { get; set; }
public abstract class usrSalesOfficesAP : PX.Data.BQL.BqlString.Field<usrSalesOfficesAP> { }
#endregion
In Classic UI, the option's display mode is set to "Text", so the screen shows the text value, but the database stores the integer.
I applied the following in the Modern UI, but it’s not working as expected. I’ve included the Modern UI code below
Html File:
<template>
<qp-grid modify id="gridTransactions">
Option 1: (Issue: Data getting vanished)
<field after="#gridTransactions [name='CuryDiscAmt']"
name="UsrSalesOfficesAP" config-display-mode.bind="text"></field>
Option 2: (Issue: Displays integer value only)
<field name="UsrSalesOfficesAP" value.bind="$record.UsrSalesOfficesAP" display-mode="text"></field>
</qp-grid>
</template>
TypeScript file: (If I add this, Getting IO Exception error while publishing package)
@columnConfig({
displayMode: GridColumnDisplayMode.Both,
editorConfig: {
displayMode: "text",
selectorMode: PXSelectorMode.TextModeEditable
}
})
UsrSalesOfficesAP: PXFieldState<PXFieldOptions.CommitChanges>;
Can anyone give me any input on this?
Thank you in advance.
Premalatha N