Skip to main content

Hi,

I need to create a field in Acumatica that automatically updates its value based on the input of other fields. Additionally, this field should also be manually editable by users. Is it possible to achieve this in Acumatica? If so, could someone please provide detailed steps or guidelines on how to implement this functionality?

Thank you in advance for your assistance!

Hi @RKarunarathne51 

  1. You need to Create custom field as below in specific DAC.
 #region UsrField
PXDBDecimal]
PXUIField(DisplayName = "Calculated Field")]
public virtual decimal? UsrCalculatedField { get; set; }
public abstract class usrField : PX.Data.BQL.BqlDecimal.Field<usrField> { }
#endregion
  1. Then implement the logic in the field updated event on which field you need to update the custom field.
    protected void APInvoice_CuryTaxTotal_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
    {
    // implement logic to update the field
    }
    1. Use RowSelected event to make the field editable. 
      PXUIFieldAttribute.SetEnabled<APInvoiceExt.usrField>(cache, row, true);

      Hope, it helps!


Reply