Contents tagged with Filter

  • Filters in Acumatica

    Hello everybody,

    in this article I want to describe how filtering in Acumatica work. When I say filtering, I mean following UI part:

    In manuals T100 - T300 there is almost nothing about how filters work, so I want to share few bits of development information.

    Storage

    All information about filters is stored in database in tables FilterRow and FilterHeader.

    Take a look on screenshot of FilterInformation for some custom applied filter:

     

    As you can see from screenshot Acumatica stores information about filters by FilterID, and has information like Condition, values, Close brackets, operators and so on.

    Also there are DAC classes FilterRow and FilterHeader, but you can find them only … more

  • How to add Database context to Filter in .Net Core 2.0

    Hello everybody,

    today I want to write a short description on how to add database context to IAuthorizationFilter.

    Imagine that you have following filter:

    public class HasApprovedFilter : Attribute, IAuthorizationFilter

    {

        private SomeDbContext _context;

        public HasApprovedFilter(SomeDbContext context)

        {

            this._context = context;

        }

        public void OnAuthorization(AuthorizationFilterContext context)

        {

            var user = context.HttpContext.User;

            if (!user.Identity.IsAuthenticated)

            {

                return;

            }

            var userAdd = _context.;

            //var um = context.HttpContext.RequestServices.GetService();

        }

    } … more