Skip to main content
Solved

Unable to select value, it is disappearing

  • 17 December 2020
  • 2 replies
  • 339 views

Hello!

 

While selecting the value through selector ,it is disappearing.

And also forward and backward buttons are not working.

Can someone help me out.

Here is the code for reference

Dac:

 public abstract class assetCD : PX.Data.BQL.BqlString.Field<assetCD> { }
        /// <summary>
        /// A string identifier, which contains a key value. This field is also a selector for navigation.
        /// </summary>
        /// <value>The value can be entered manually or can be auto-numbered.</value>
        &PXDBString(15, IsUnicode = true, IsKey = true, InputMask = ">CCCCCCCCCCCCCCC")]
        CPXDBDefault]
        PPXUIField(DisplayName = "Asset ID", Visibility = PXUIVisibility.SelectorVisible)]
        ePXSelector(typeof(Search2<FixedAsset.assetCD,
            LeftJoin<FADetails, On<FADetails.assetID, Equal<FixedAsset.assetID>>,
            LeftJoin<FALocationHistory, On<FALocationHistory.assetID, Equal<FixedAsset.assetID>,
                And<FALocationHistory.revisionID, Equal<FADetails.locationRevID>>>,
            LeftJoin<Branch, On<Branch.branchID, Equal<FALocationHistory.locationID>>,
            LeftJoin<EPEmployee, On<EPEmployee.bAccountID, Equal<FALocationHistory.employeeID>>,
            LeftJoin<FAClass, On<FAClass.assetID, Equal<FixedAsset.classID>>>>>>>,
            Where<recordType, Equal<Current<recordType>>>>),
            typeof(assetCD),
            typeof(description),
            typeof(classID),
            typeof(FAClass.description),
            typeof(depreciable),
            typeof(usefulLife),
            typeof(assetTypeID),
            typeof(FADetails.status),
            typeof(Branch.branchCD),
            typeof(EPEmployee.acctName),
            typeof(FALocationHistory.department),
            Filterable = true)]
        FARecordType.Numbering]
        ÂPXFieldDescription]
        public virtual string AssetCD { get; set; }

 

tPXDBString(15, IsUnicode = true, IsKey = true, InputMask = ">CCCCCCCCCCCCCCC")]
        PXDBDefault]
        gIBPropertySelector(typeof(Search2<FixedAsset.assetCD,
        LeftJoin<FADetails, On<FADetails.assetID, Equal<FixedAsset.assetID>>,
        LeftJoin<FALocationHistory, On<FALocationHistory.assetID, Equal<FixedAsset.assetID>,
        And<FALocationHistory.revisionID, Equal<FADetails.locationRevID>>>,
        LeftJoin<PX.Objects.GL.Branch, On<PX.Objects.GL.Branch.branchID, Equal<FALocationHistory.locationID>>,
        LeftJoin<EPEmployee, On<EPEmployee.userID, Equal<FALocationHistory.custodian>>,
                    LeftJoin<FAClass, On<FAClass.assetID, Equal<FixedAsset.classID>>,
                    LeftJoin<IBResidentialInfo, On<IBResidentialInfo.assetID, Equal<FixedAsset.assetID>>>>>>>>,
        Where<FixedAsset.recordType, Equal<Current<FixedAsset.recordType>>, And<IBFixedAssetExt.usrIBIsProperty, Equal<boolTrue>>>>)
                 )]
        ,PXSelector(typeof(Search<FixedAsset.assetCD>))]
        lIBPropertyNumbering]
        nPXFieldDescription]
        rPXUIField(DisplayName = IBConstants.PropertyID, Visibility = PXUIVisibility.SelectorVisible, TabOrder = 1)]
        protected virtual void FixedAsset_AssetCD_CacheAttached(PXCache cache)
        {
        }

Sorry ,Missing some more information regarding above  which may help to fix.

 


Hi @saikiranb36,

Looking at your FixedAsset_AssetCD_CacheAttached code snippet it seems that you have two PXSelectors attribute… is this with intention? If not please try removing one of these:

 >IBPropertySelector(typeof(Search2<FixedAsset.assetCD,
        LeftJoin<FADetails, On<FADetails.assetID, Equal<FixedAsset.assetID>>,
        LeftJoin<FALocationHistory, On<FALocationHistory.assetID, Equal<FixedAsset.assetID>,
        And<FALocationHistory.revisionID, Equal<FADetails.locationRevID>>>,
        LeftJoin<PX.Objects.GL.Branch, On<PX.Objects.GL.Branch.branchID, Equal<FALocationHistory.locationID>>,
        LeftJoin<EPEmployee, On<EPEmployee.userID, Equal<FALocationHistory.custodian>>,
                    LeftJoin<FAClass, On<FAClass.assetID, Equal<FixedAsset.classID>>,
                    LeftJoin<IBResidentialInfo, On<IBResidentialInfo.assetID, Equal<FixedAsset.assetID>>>>>>>>,
        Where<FixedAsset.recordType, Equal<Current<FixedAsset.recordType>>, And<IBFixedAssetExt.usrIBIsProperty, Equal<boolTrue>>>>)
                 )]
        cPXSelector(typeof(Search<FixedAsset.assetCD>))]

Also looking at your code you are only changing/replacing these three attributes:

-PXSelector

-Numbering Attribute

-PXUIField

So you could try to remove those out-of-the-box attributes and the add your new desired attributes on the CacheAttached using this approach as well:

        aPXMergeAttributes(Method = MergeMethod.Append)]
PXRemoveBaseAttribute(typeof(PXSelectorAttribute))] //Removes ootb PXSelector attribute
rPXRemoveBaseAttribute(typeof(FARecordType.NumberingAttribute))] //Removes ootb Autonumbering attribute
ePXRemoveBaseAttribute(typeof(PXUIFieldAttribute))] //Removes ootb PXUIField Attribute
//Then add your new Attributes with only one PXSelector attr.
IBPropertySelector(typeof(Search2<FixedAsset.assetCD,
LeftJoin<FADetails, On<FADetails.assetID, Equal<FixedAsset.assetID>>,
LeftJoin<FALocationHistory, On<FALocationHistory.assetID, Equal<FixedAsset.assetID>,
And<FALocationHistory.revisionID, Equal<FADetails.locationRevID>>>,
LeftJoin<PX.Objects.GL.Branch, On<PX.Objects.GL.Branch.branchID, Equal<FALocationHistory.locationID>>,
LeftJoin<EPEmployee, On<EPEmployee.userID, Equal<FALocationHistory.custodian>>,
LeftJoin<FAClass, On<FAClass.assetID, Equal<FixedAsset.classID>>,
LeftJoin<IBResidentialInfo, On<IBResidentialInfo.assetID, Equal<FixedAsset.assetID>>>>>>>>,
Where<FixedAsset.recordType, Equal<Current<FixedAsset.recordType>>, And<IBFixedAssetExt.usrIBIsProperty, Equal<boolTrue>>>>)
)]
TIBPropertyNumbering]
PXUIField(DisplayName = IBConstants.PropertyID, Visibility = PXUIVisibility.SelectorVisible, TabOrder = 1)]
protected virtual void FixedAsset_AssetCD_CacheAttached(PXCache sender)
{
}

 


Reply