OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions How to programatically add fields?

This topic contains 1 reply, has 2 voices, and was last updated by Jaimy Jaimy 6 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
  • #24696

    David Lukac

    What is the correct way to add new fields to entities programatically?

    Continuing from previous discussions (http://oroinc.com/orocrm/forums/topic/simple-how-to-customise-area-of-code“, http://oroinc.com/orocrm/forums/topic/simple-example-of-how-to-make-a-change-to-orocrm), where it was explained how to override Twig templates, I’d be interested in correct programmatic way to add new field to entities, e.g. I want to add string field to Contact entity, without interfering with Oro codebase to avoid conflicts in future.

    So far I was able to create my own bundle, which overrides Contact bundle, I’ve created MyField entity and DB table for it, extended Contact entity and added $myField field, but I’m a bit stuck with the controller and routing (I wanted to keep the same route e.g. /contact/view/XY).

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

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

Yes No