public override void DescriptionFieldSelecting(PXCache sender, PXFieldSelectingEventArgs e, string alias) { if (e.Row == null || (sender.GetValue(e.Row, _FieldOrdinal) == null)) { base.DescriptionFieldSelecting(sender, e, alias); } else { UPCompany item = null; Object value = sender.GetValue(e.Row, _FieldOrdinal); Int32 key = (Int32)value; foreach (UPCompany info in PXCompanyHelper.SelectCompanies()) { if (info.CompanyID == key) { item = info; break; } } if (item != null) { e.ReturnValue = sender.Graph.Caches[_Type].GetValue(item, _DescriptionField.Name); } } }
protected virtual IEnumerable GetRecords() { PXCache cache = _Graph.Caches[typeof(UPCompany)]; Int32 current = PX.Data.Update.PXInstanceHelper.CurrentCompany; foreach (UPCompany info in PXCompanyHelper.SelectCompanies(PXCompanySelectOptions.Visible)) { if (current != info.CompanyID) { yield return(info); } } }
protected void LMICVendor_TenantID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e) { var row = (LMICVendor)e.Row; if (row == null || row.TenantID == null) { return; } foreach (UPCompany info in PXCompanyHelper.SelectCompanies()) { if (info.CompanyID == row.TenantID) { row.LoginName = info.LoginName; break; } } }