OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Installation/Technical Issues or Problems Default value on custom entity field not working

This topic contains 2 replies, has 2 voices, and was last updated by  zach1 3 years, 10 months ago.

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

  • Creator
  • #40995


    Hello! I am having an issue with a custom field. I have recently upgraded from 2.4.1 to 3.1.14.

    On the Email entity, there is a custom field added called internal_status, as stored in the table, which can have the value “Open” or “Archived”, with “Open” being specified as the default. Unfortunately, when a new email is synced from IMAP, it is added to the oro_email table with internal_status as NULL. The name of the column in the table is “internal_status_id”, and emails prior to the upgrade were set correctly as “open” in that field when they came in. I did not originally set up the field, so I am unsure what exactly was done to create it, but I’m happy to check anything that might be relevant. I have tried changing the default to “Archived” and back to try to refresh it, but that did not change the issue. I also tried setting the internal_status_id database column to default ‘open’, but emails continued to be NULL in that field, so I changed it back to default null. I’m not sure where to look to diagnose it further.

    I’ve attached a picture showing the configuration for it, as well as a text file showing the table definitions for oro_email and the internal_status enum table.

    1. pic-1-128x72
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #41026

    Andrey Yatsenko

    Please clarify, are you checking to create new Emails from UI and want the default value to be used in a form there or it must be set from the code on some background operations, or maybe something else?



    The emails are being created from the IMAP sync process, specifically the oro:cron:imap-sync command.

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

The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top