Skip to main content
Answer

Unable to see Location when focus is out of the selector in a grid

  • April 26, 2023
  • 2 replies
  • 95 views

Forum|alt.badge.img

I have created a location selector under “Component and Warranties” grid in Equipment Screen (FS205000).

The selector is working fine, location is also getting selected and saved into db. but when the focus is removed from the selector field, I can’t see the value.

 

below is my code and screenshots attached : 

 

#region UsrXDLocation
        [PXDBInt]
        [PXUIField(DisplayName = "Location")]
        [PXSelector(typeof(Search<Location.locationID,Where<Location.bAccountID, Equal<Current<FSEquipment.customerID>>>>), 
            DescriptionField = typeof(Location.descr), SubstituteKey = typeof(Location.locationCD), Filterable = true)]
        public virtual int? UsrXDLocation { get; set; }
        public abstract class usrXDLocation : PX.Data.BQL.BqlInt.Field<usrXDLocation> { }
#endregion

 

This code is under FSEquipmentComponentExt.

This screenshot is when the field is on focus : 

 

This screenshot is when the field is out of focus : 

 

 

Thanks and Regards

Best answer by darylbowman

I don’t see any real issues with your code, but have you tried using the Location attribute that Acumatica seems to use on their Locations?

#region UsrXDLocation
[LocationActive(
typeof(Where<Location.bAccountID, Equal<Current<FSEquipment.customerID>>>),
DescriptionField = typeof(Location.descr),
Visibility = PXUIVisibility.SelectorVisible)]
public virtual int? UsrXDLocation { get; set; }
public abstract class usrXDLocation : PX.Data.BQL.BqlInt.Field<usrXDLocation> { }
#endregion

 

2 replies

anahizentella94
Jr Varsity III
Forum|alt.badge.img

Did you fix this? I'm having the same problem with a custom field


darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • August 28, 2023

I don’t see any real issues with your code, but have you tried using the Location attribute that Acumatica seems to use on their Locations?

#region UsrXDLocation
[LocationActive(
typeof(Where<Location.bAccountID, Equal<Current<FSEquipment.customerID>>>),
DescriptionField = typeof(Location.descr),
Visibility = PXUIVisibility.SelectorVisible)]
public virtual int? UsrXDLocation { get; set; }
public abstract class usrXDLocation : PX.Data.BQL.BqlInt.Field<usrXDLocation> { }
#endregion