I have created a Custom PXSelector Control Field in Acumatica Invoices and Memos(ScreenID=AR301000). The control is in the Document Details Grid. The selector load values well but the problem is if a user adds another row to the Document Details Grid, the value selected in the previous row self clears??? Below is my code:
using PX.Data.ReferentialIntegrity.Attributes;
using PX.Data;
using PX.Objects.AR;
using PX.Objects.CM;
using PX.Objects.Common.Discount.Attributes;
using PX.Objects.Common.Discount;
using PX.Objects.Common;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.DR;
using PX.Objects.GL.DAC.Abstract;
using PX.Objects.GL;
using PX.Objects.IN;
using PX.Objects.PM;
using PX.Objects.TX;
using PX.Objects;
using System.Collections.Generic;
using System.Diagnostics;
using System;
namespace PX.Objects.AR
{
public class ARTranExt : PXCacheExtension<PX.Objects.AR.ARTran>
{
#region UsrResource
[PXDBInt]
[PXUIField(DisplayName="Resource")]
[PXSelector(
typeof(Search<CSAttributeDetail.valueID,Where<CSAttributeDetail.attributeID, Equal<AttributeExtender.resource>>>),
typeof(CSAttributeDetail.valueID),
typeof(CSAttributeDetail.description),
SubstituteKey = typeof(CSAttributeDetail.valueID)
)]
public virtual int? UsrResource { get; set; }
public abstract class usrResource : PX.Data.BQL.BqlInt.Field<usrResource> { }
#endregion
}
public static class AttributeExtender
{
public const string Resource = "RESOURCE";
public class resource : PX.Data.BQL.BqlString.Constant<resource>
{
public resource() : base(Resource) {; }
}
}
}
What could possibly be the problem?