OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform Cannot access custom field in datagrid

This topic contains 3 replies, has 2 voices, and was last updated by  Mike Kudelya 7 years, 5 months ago.

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

  • Creator
    Topic
  • #36993

    quuuaid
    Participant

    Hi all,

    I have an issue which has me completely stumped. I have an extended entity which I added a field to via a migration:

    This is how the entity’s relations array now looks if use run oro:entity-config:debug:

    I am now trying to retrieve this relation in the datagrid:

    But I am receiving the following error:

    An exception has been thrown during the rendering of a template (“No mapping found for field ‘contacts’ on class ‘K8\Bundle\CentreBundle\Entity\Centre’.”) in OroDataGridBundle:Grid/widget:widget.html.twig at line 11.

    Where am I going wrong here? Thanks in advance!

    Miles

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

    Mike Kudelya
    Participant

    Hi

    You can use extended fields on grid only if you can’t remove them from UI. Try to mark our field as read only:

    #36995

    quuuaid
    Participant

    Thanks Mike! I’ll give that a try. Actually this prompted me to grep the crm repo for MODE_READONLY which revealed a nice example of passing additional parameters in https://github.com/orocrm/crm/blob/master/src/Oro/Bundle/ChannelBundle/Migrations/Schema/OroChannelBundleInstaller.php#L310. It would be great if these options were documented in more detail as both the docs and nearly all the examples within the platform and crm repos only demonstrate the use of the ‘owner’ key.

    #36996

    Mike Kudelya
    Participant

    We will consider it, thanks

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

The forum ‘OroPlatform’ is closed to new topics and replies.

Back to top