Skip to main content
Answer

Selector Issue finding values in the system.

  • November 21, 2024
  • 2 replies
  • 155 views

Forum|alt.badge.img

Good day, 

I have a customization with 2 custom fields that are selectors called 480 Tax Line, one in Non sotck item screen and another in the lines of Bills and Adjustments; these selectors have the values from an Attribute and there is an Instance where I am having an error, everytime I choose one of the options and press save, I receive the error "Error: Updating  'Inventory Item' record raised at least one error. Please review the errors.” and then in the field it has the error 

'480 Tax Line' cannot be found in the system.

The DAC is configured to show the description of the attribute in the UI and save the ValueID in the database, everything is working well on every other Instance I publish my customization, but in this one I don't understand why I have conflicts where everything is the same, the attributeID is APLINE and the data is the same on every other environment I have tested.

 public class InventoryItemExt : PXCacheExtension<PX.Objects.IN.InventoryItem>
{ #region UsrFieldTaxLine
[PXDBString(255)]
[PXUIField(DisplayName = "480 Tax Line")]
[PXSelector(
typeof(Search<CSAttributeDetail.valueID, Where<CSAttributeDetail.attributeID, Equal<SpecificTaxLine>>>), new Type[] { typeof(CSAttributeDetail.valueID),
typeof(CSAttributeDetail.description) }, SubstituteKey = typeof(CSAttributeDetail.description))]
public virtual string UsrFieldTaxLine { get; set; }
public abstract class usrFieldTaxLine : PX.Data.BQL.BqlInt.Field<usrFieldTaxLine> { }
#endregion
}
public class SpecificTaxLine : PX.Data.BQL.BqlString.Constant<SpecificTaxLine>
{
public SpecificTaxLine() : base("APLINE") { }
}
public class APTranExt : PXCacheExtension<PX.Objects.AP.APTran>
{ #region UsrTaxLineField
[PXDBString(255)]
[PXUIField(DisplayName = "480 Tax Line")]
[PXSelector(typeof(Search<CSAttributeDetail.valueID, Where<CSAttributeDetail.attributeID, Equal<SpecificTaxLine>>>), new Type[] { typeof(CSAttributeDetail.valueID),
typeof(CSAttributeDetail.description) }, SubstituteKey = typeof(CSAttributeDetail.description))]
public virtual string UsrTaxLineField { get; set; }
public abstract class usrTaxLineField : PX.Data.BQL.BqlString.Field<usrTaxLineField> { }
#endregion


}

 

Best answer by Django

Your public abstract class for the first field has a declaration of BqlInt instead of BqlString.

2 replies

Forum|alt.badge.img+7
  • Captain II
  • Answer
  • November 21, 2024

Your public abstract class for the first field has a declaration of BqlInt instead of BqlString.


DipakNilkanth
Pro III
Forum|alt.badge.img+13

Hi ​@orlandonegron43,

Have you tried resetting the caches for that instance?
If you are experiencing issues with that specific instance and not with other instances, please try resetting the caches in your test environment.
Hope, it helps!