Good morning,
I have customized two fields in the first customized project of the project screen. apart in another two customized project a pxselector is being made to the UsrBaseIndex field passing the "PMAddressExt.usrCounty" field as a parameter, but I notice that it does not show information, it could indicate that I am doing it wrong.
Attached image for better understanding.
Thanks in advance.
project 1
namespace PX.Objects.PM
{
public class PMAddressExt : PXCacheExtension<PX.Objects.PM.PMAddress>
{
#region UsrGeocode
[PXDBString(30)]
[PXUIField(DisplayName="Geo code")]
public virtual string UsrGeocode { get; set; }
public abstract class usrGeocode : PX.Data.BQL.BqlString.Field<usrGeocode> { }
#endregion
#region UsrCounty
[PXDBInt]
[PXUIField(DisplayName="County")]
[PXSelector(
typeof(PESKCounty.countyID),
typeof(PESKCounty.countyCD),
typeof(PESKCounty.countyName),
DescriptionField = typeof(PESKCounty.countyName),
SubstituteKey = typeof(PESKCounty.countyCD))]
[PXRestrictor(typeof(Where<PESKCounty.stateID, Equal<Current<PMSiteAddress.state>>>), "", typeof(PESKCounty.stateID))]
public virtual int? UsrCounty { get; set; }
public abstract class usrCounty : PX.Data.BQL.BqlInt.Field<usrCounty> { }
#endregion
}
}
project 2
namespace PX.Objects.CT
{
public class ContractExt : PXCacheExtension<PX.Objects.CT.Contract>
{
#region UsrSPriceIndex
[PXDBBool]
[PXUIField(DisplayName = "Subject to Price Index")]
public virtual bool? UsrSPriceIndex { get; set; }
public abstract class usrSPriceIndex : PX.Data.BQL.BqlBool.Field<usrSPriceIndex> { }
#endregion
#region UsrPRCNumber
[PXDBInt]
[PXUIField(DisplayName = "PRC Number")]
[PXSelector(typeof(Search2<PESKPRC.recordID,
InnerJoin<PESKCountyPriceIndexDetail, On<PESKCountyPriceIndexDetail.recordID, Equal<PESKPRC.recordID>>>,
Where<PESKPRC.availabletoAll, Equal<True>,
And<PESKPRC.active, Equal<True>
//And<PESKCountyPriceIndexDetail.countyID, Equal<Current<PMAddressExt.usrCounty>>>
>>>),
typeof(PESKPRC.prcnbr),
typeof(PESKCountyPriceIndexDetail.pRCPriceIndexCD),
SubstituteKey = typeof(PESKPRC.prcnbr)
)]
public virtual int? UsrPRCNumber { get; set; }
public abstract class usrPRCNumber : PX.Data.BQL.BqlInt.Field<usrPRCNumber> { }
#endregion
#region UsrBaseIndex
[PXDBInt]
[PXUIField(DisplayName = "Base Index")]
[PXSelector(typeof(Search<PESKViewBaseIndex.priceIndexID,
Where<PESKViewBaseIndex.recordID, IsNull
,And<PESKViewBaseIndex.countyID, Equal<Current<PMAddressExt.usrCounty>>,
Or<PESKViewBaseIndex.countyID,IsNull>
>
>>),
typeof(PESKViewBaseIndex.pRCPriceIndexCD),
SubstituteKey = typeof(PESKViewBaseIndex.pRCPriceIndexCD),ValidateValue =false)]
public virtual int? UsrBaseIndex { get; set; }
public abstract class usrBaseIndex : PX.Data.BQL.BqlInt.Field<usrBaseIndex> { }
#endregion
#region UsrPCNumber
[PXDBString(60)]
[PXUIField(DisplayName = "PCNumber")]
public virtual string UsrPCNumber { get; set; }
public abstract class usrPCNumber : PX.Data.BQL.BqlString.Field<usrPCNumber> { }
#endregion
}
}