OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums 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 8 years ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #27076

    Paul Stoica
    Participant

    Hello,

    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.

    Paul.

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

    Paul Stoica
    Participant

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

    #27078

    Yevhen Shyshkin
    Participant

    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.

    #27079

    Paul Stoica
    Participant

    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.
    Paul.

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

The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top