OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums 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 5 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
    Topic
  • #24931
    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
  • #24932

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

    #24933
    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)

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