Solved

Unable to select value, it is disappearing

  • 17 December 2020
  • 2 replies
  • 320 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")]
        [PXDBDefault]
        [PXUIField(DisplayName = "Asset ID", Visibility = PXUIVisibility.SelectorVisible)]
        [PXSelector(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; }

 

[PXDBString(15, IsUnicode = true, IsKey = true, InputMask = ">CCCCCCCCCCCCCCC")]
        [PXDBDefault]
        [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>>>>)
                 )]
        [PXSelector(typeof(Search<FixedAsset.assetCD>))]
        [IBPropertyNumbering]
        [PXFieldDescription]
        [PXUIField(DisplayName = IBConstants.PropertyID, Visibility = PXUIVisibility.SelectorVisible, TabOrder = 1)]
        protected virtual void FixedAsset_AssetCD_CacheAttached(PXCache cache)
        {
        }

icon

Best answer by Cesar Betances 18 January 2021, 16:26

View original

2 replies

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

 

Userlevel 4
Badge +2

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>>>>)
                 )]
        [PXSelector(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:

        [PXMergeAttributes(Method = MergeMethod.Append)]
[PXRemoveBaseAttribute(typeof(PXSelectorAttribute))] //Removes ootb PXSelector attribute
[PXRemoveBaseAttribute(typeof(FARecordType.NumberingAttribute))] //Removes ootb Autonumbering attribute
[PXRemoveBaseAttribute(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>>>>)
)]
[IBPropertyNumbering]
[PXUIField(DisplayName = IBConstants.PropertyID, Visibility = PXUIVisibility.SelectorVisible, TabOrder = 1)]
protected virtual void FixedAsset_AssetCD_CacheAttached(PXCache sender)
{
}

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved