ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums OroPlatform Cannot access custom field in datagrid

This topic contains 3 replies, has 2 voices, and was last updated by Mike Kudelya Mike Kudelya 1 year, 4 months ago.

  • Creator
    Topic
  • #63348
    quuuaid
    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
  • #63349
    Mike Kudelya
    Mike Kudelya
    Moderator

    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:


    #63351
    quuuaid
    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.

    #63352
    Mike Kudelya
    Mike Kudelya
    Moderator
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

ssossossosso