OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Adding attachment fields to an entity through migration

This topic contains 2 replies, has 2 voices, and was last updated by  acll19 8 years, 11 months ago.

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

  • Creator
    Topic
  • #25028

    acll19
    Participant

    I added two attachment fields to the Lead entity, when I go to the Entity Managment on the frontend I can see that the fields were added, but when I create a Lead the fields are not showing. Also when I try to view a Lead I get this exception:

    An exception has been thrown during the rendering of a template (“An exception occurred while executing ‘SELECT count(o0_.id) AS sclr0 FROM oro_attachment o0_ LEFT JOIN orocrm_sales_lead o1_ ON o0_.lead_5b29b7d2_id = o1_.id AND (o1_.organization_id = 1) WHERE o1_.id = ? AND o0_.organization_id = 1’ with params [“101″]:

    SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘o0_.lead_5b29b7d2_id’ in ‘on clause'”) in /var/www/html/crm-application/vendor/oro/platform/src/Oro/Bundle/AttachmentBundle/Resources/views/Attachment/widget/attachments.html.twig at line 1.

    So my question is: do I have to do something to activate such fields?
    Note: I added two more string-typed fields to the Lead entity and they show in the grid and the creation form.
    I will appreciate any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #25029

    Yurii Muratov
    Participant

    Hi, @acll19.
    Can you provide your migration?

    #25030

    acll19
    Participant

    This is my second migration. On the first one I added two string-typed fields and it worked, but this one didn’t.

Viewing 2 replies - 1 through 2 (of 2 total)

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

Back to top