ssossossosso

Forums

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

Open-Source CRM software Forums OroCRM OroCRM – Programming Questions Contact Bundle: Making Last_Name field optional

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

  • Creator
    Topic
  • #7063
    Spurgeon
    Spurgeon
    Participant

    Hi,

    Greetings!

    For our use case, we dont need Last Name as our input source contains name as a single field and we dont wish to waste time splitting names in thousands of records.

    So we need to make the Last name field as optional.

    I tried this:

    1. Edited ContactBundle\Entity\Contact.php and added nullable = true to ORM Column and nillable = true to SOAP\ComplexType to annotations of $lastname in Contact class definition.

    2. Edited ContactBundle\FormType\ContactType.php and set required => false.

    3. executed app/console oro:entity-config:update

    4. Cleared cache

    While the form seems to be ok, importing data with blank lastnames doesnt work.

    Could you kindly point to what am missing or need to do to make OOB mandatory fields optional?

    Thanks!

    regards
    Spurgeon

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #7079
    Dmitry Khrysev
    Dmitry Khrysev
    Oro Core

    Hi. Import checks all records with Symfony2 Validation. It’s rules are placed in validation.yml file in bundle Resources/config folder

    #7083
    Spurgeon
    Spurgeon
    Participant

    Hi Dmitry,

    Greetings!

    Thanks for the kind pointer! Will check this out!

    Warm regards and gratitude,
    Spurgeon

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

You must be logged in to reply to this topic.