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

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 Andrey Mishchenko 3 years ago.

  • Creator
  • #57145


    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
  • #57146

    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
    • 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)

You must be logged in to reply to this topic.