Hi Team,
I need to add the exiting database values to controls after selecting the particular vendor. I wrote some code and it is not working it clears the all controls. Can someone help me out?
protected void _(Events.FieldUpdated<HMRCVendorRegisterDetail, HMRCVendorRegisterDetail.bAccountID> e)
{
HMRCVendorRegisterDetail row = e.Row;
if (row.BAccountID != null && row.BAccountID > 0)
{
HMRCVendorRegisterDetail vendorDetail = PXSelectReadonly<HMRCVendorRegisterDetail,
Where<HMRCVendorRegisterDetail.bAccountID, Equal<Required<HMRCVendorRegisterDetail.bAccountID>>>>.
Select(this, row.BAccountID);
VendorRegisterDetail.Current = vendorDetail;
//VendorRegisterDetail.Current.Hmrcregid= vendorDetail.Hmrcregid;
//VendorRegisterDetail.Current.Active = vendorDetail.Active;
//VendorRegisterDetail.Current.HMRCVendorVerified = vendorDetail.HMRCVendorVerified;
//VendorRegisterDetail.Current.HMRCVendorPrecentage = vendorDetail.HMRCVendorPrecentage;
//VendorRegisterDetail.Current.HMRCVendorRegTypeID = vendorDetail.HMRCVendorRegTypeID;
//VendorRegisterDetail.Current.ValidFrom = vendorDetail.ValidFrom;
//VendorRegisterDetail.Current.ValidTo = vendorDetail.ValidTo;
//VendorRegisterDetail.Current.VerifiedDate = vendorDetail.VerifiedDate;
//VendorRegisterDetail.Current.Utrno = vendorDetail.Utrno;
//VendorRegisterDetail.Current.VerificationResult = vendorDetail.VerificationResult;
//VendorRegisterDetail.Current.VerifiedTypeID = vendorDetail.VerifiedTypeID;
//VendorRegisterDetail.Current.VerificationNote = vendorDetail.VerificationNote;
}
}