protected virtual void GLBudgetTree_IsGroup_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { PXStringState strState = (PXStringState)sender.GetStateExt(null, typeof(GLBudgetTree.accountID).Name); PXDBStringAttribute.SetInputMask(sender, typeof(GLBudgetTree.accountMask).Name, strState.InputMask.Replace('#', 'C')); strState = (PXStringState)sender.GetStateExt(null, typeof(GLBudgetTree.subID).Name); PXDBStringAttribute.SetInputMask(sender, typeof(GLBudgetTree.subMask).Name, strState.InputMask.Replace('A', 'C')); }
public override void CacheAttached(PXCache sender) { base.CacheAttached(sender); if (costCodeField != null) { sender.Graph.FieldDefaulting.AddHandler(sender.GetItemType(), FieldName, FieldDefaulting); } PXDBStringAttribute dbStringAttribute = DBAttribute as PXDBStringAttribute; if (dbStringAttribute != null && dbStringAttribute.IsKey) { // Working with selectors without a SubstituteKey as key fields presents some issues. When the selector is a key field, // the input mask for the field gets cleared in CacheAttached. We need to manually set it back here // to ensure the selector field works correctly with free-form input. StringBuilder inputMask = new StringBuilder(">"); for (int i = 0; i < dbStringAttribute.Length; i++) { inputMask.Append("a"); } PXDBStringAttribute.SetInputMask(sender, _FieldName, inputMask.ToString()); } }
public override void Initialize() { PXDBStringAttribute.SetInputMask <APInvoice.docDesc>(Base.Document.Cache, ">CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"); }