Working now! I've just added a View Controller to filter rows. Many thanks! ----- public partial class BranchSupportLVRowsFilteringController : ObjectViewController { protected override void OnActivated() { base.OnActivated(); if (!SecuritySystem.IsAuthenticated) return; if (XafariSecuritySystem.IsAdministrator(SecuritySystem.CurrentUser as ISecurityUserWithRoles)) return; ApplyRowFilter(); } private void ApplyRowFilter() { if (!(SecuritySystem.CurrentUser is IDCSecuritySystemUser currentUser)) return; if (currentUser.Branches().BranchItems.Count <= 0) return; var criterion = currentUser.Branches().BranchItems.Aggregate(null, (current, branchItem) => CriteriaOperator.Or(current, new BinaryOperator("BranchCode", branchItem.Branch.Code))); View.CollectionSource.BeginUpdateCriteria(); View.CollectionSource.Criteria.Clear(); View.CollectionSource.Criteria["BranchesOnlyFiltering"] = criterion; View.CollectionSource.EndUpdateCriteria(); } } |