OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions Grid – update link depending on entity

This topic contains 1 reply, has 2 voices, and was last updated by  Andrey Mishchenko 7 years, 7 months ago.

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

  • Creator
  • #28292


    Hi there,

    I configured a grid, in it, there are different types of entities (Single Table inheritance). How do I have to configure the update link route, depending on entity type in this grid?


Viewing 1 replies (of 1 total)
  • Author
  • #28293

    Andrey Mishchenko

    Hello, jmclane!

    You can create intermediate action as entry point for updating all of your entities, like this

    There is also another a little bit more complex approach:

    • Duplicate `discr` field of your entities to be able to access it from DQL (because of http://www.doctrine-project.org/jira/browse/DDC-3026)
    • Request it in datagrid query
    • Create and register your own Datagrid Property Formatter that extends Oro\Bundle\DataGridBundle\Extension\Formatter\Property\UrlProperty
    • Override getRawValue method and pass there id and type of the record
    • Generate your routes depending on id and type values

    Example of parameters block configuration

Viewing 1 replies (of 1 total)

The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.

Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No