ssossossosso

Forums

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

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

  • Creator
    Topic
  • #7675

    jmcclane
    Participant

    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?

    THX!

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #8403

    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)

You must be logged in to reply to this topic.