Forums OroCRM OroCRM – Installation/Technical Issues or Problems Problem on getting entities with 'EntityProvider' service

This topic contains 3 replies, has 2 voices, and was last updated by  Paul Stoica 1 year, 9 months ago.

  • Creator
  • #24385

    Paul Stoica


    I saw an issue when I tried to get all configurable entities with the EntityProvider service(@oro_entity.entity_provider) if I put the ‘applyExclusions’ parameter to true.
    Also this service is used in OroQueryDesignerBundle:QueryDesignerEntity:fields api controller, that is used in report’s and segment’s form.

    Is applied the ‘OroCRM\Bundle\ChannelBundle\Provider\ChannelEntityExclusionProvider’ entity exclusion provider, and many entities like ‘Account’, ‘Contact’ etc, will not appear in the entity selection when you try to create a report, unless you create a channel which contains all these entities.

    I use ‘1.9.*’ version for oro-platform/oro-crm.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #24386

    Paul Stoica

    my bad, I speak about ‘@oro_query_designer.entity_field_list_provider’ service, with class ‘Oro\Bundle\EntityBundle\Provider\EntityWithFieldsProvider’, getFields method.


    Yevhen Shyshkin

    Hello, Paul.

    That’s not an issue – query designer allows to work only with entities that might have data in your system.
    If you want all available entities you can disable exclusions using argument $applyExclusions = false.

    Can you explain your business case? It might be a better way to do that.


    Paul Stoica

    Yes, make sense now, you can’t make a report for account if that account doesn’t have any data in the system.

    My case was to get all entities with fields in twig template(for this I used ‘oro_api_querydesigner_fields_entity’ api route), but I researched a bit in the provider code and I made my own route where I put this parameter($applyExclusions) to false for that service, so now works.

    Thank you and I’m sorry I didn’t notice it.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.