This topic contains 9 replies, has 3 voices, and was last updated by Rodolfo 9 years, 5 months ago.
- Topic
Hi Fellow Oro’ers,
I’ve seen everybody is having a struggle with adding fields to existing entities, and I’m experiencing the exact same. I’m trying to add a field to the Account entity, ofcourse after reading the other topics and https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/EntityExtendBundle/README.md, I’ve added a migration script for this field.
The migration script works perfectly, and I can see (by using ExtendScope::OWNER_CUSTOM) the field is nicely added to the Additional Information tab. The thing is that you can only use the “target fields” from the entity I want to include in the Account. In my case this is the Oro User, I can select the username but I would like to use the “oro_user_select” instead of the options from a specific field (i.e. username, firstname or a different field from Oro User).
I’ve tried to use ExtendScope::OWNER_SYSTEM and have tried to add the form fields manually and this works out, but only when you’re adding the ‘mapped => false’ option to the form field you want to add (since the fields are not actually mapped by the Account entity and it will throw an error if you do not specify this option).
At this point I’m stuck at the above since I do not see how I can make use of the “oro_user_select” form field, and saving it’s value on the Account entity. Do I need to override the Formhandler as well? If so how do I get the values back to the form, like it was a mapped field of the Account entity?
I’m looking forward to some of your ideas on this matter.
Kind Regards,
Jaimy Casteleijn
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.