GraemeLM
5 months agoTrusted Partner
Solved
Custom selector field working in one tenant, but errors in second tenant
I have a custom field working as expected in Tenant 1, but in other tenants it errors. Publishing was performed using the Publish to Multiple Tenants button. POOrder.CustomField is a selecto...
- 5 months ago
Changed approach and used a different method to define the Item Class. Instead of using a constant in the code, created a custom checkbox on the Item Class, to flag it as the relevant class for the selector to show items of that class.
Item Class DAC Extension:
public class INItemClassExt : PXCacheExtension<PX.Objects.IN.INItemClass> { #region CustomItemClassFlag [PXDBBool] [PXUIField(DisplayName="Custom Item Class Flag")] public virtual Boolean? CustomItemClassFlag { get; set; } public abstract class customItemClassFlag : PX.Data.BQL.BqlBool.Field<customItemClassFlag> { } #endregion )
Purchase Order DAC Extension:public class POOrderExt : PXCacheExtension<PX.Objects.PO.POOrder> { #region CustomField [PXDBString(50)] [PXUIField(DisplayName = "Custom Field")] [PXSelector( typeof(Search2<InventoryItem.inventoryCD, InnerJoin<INItemClass, On<InventoryItem.itemClassID, Equal<INItemClass.itemClassID>>>, Where<INItemClassExt.customItemClassFlag, Equal<True>>>), typeof(InventoryItem.inventoryCD), typeof(InventoryItem.descr), SubstituteKey = typeof(InventoryItem.inventoryCD), DescriptionField = typeof(InventoryItem.descr))] public string CustomField { get; set; } public abstract class customField : IBqlField { } #endregion )