Announcement
Collapse
No announcement yet.
Change opportunity's contacts field (make contactRole multi-enum field)
Collapse
X
-
@rabbi Did you manage to solve the issue? I have the same situation, and I can't display a multiEnum select. I changed the Role field to multiEnum, but I can't get it to display. Thank you for any hint.
-
hey @item
Thanks for sharing this with me, i have looked at it and teams is just a many to many relationship field between users and teams there is no additional fields in the pivot table. what i need is a way to allow each contact on opportunity to have multiple roles rather then just one role e.g a contact could be (decision maker - influencer) at the same time.
-
Hello
telecastg i will give you a sample
https://github.com/espocrm/espocrm/b...ields/teams.js
when you create a user, and add teams to user, it's a enum.. so just replicate
(for information.. i have not skill but it's possible for me)
Beste Regards
- Likes 1
Leave a comment:
-
Unfortunately, the proposed solution only works when you are changing a simple enum to a simple multi-enum field type.
It looks like the opportunityRole is really not a simple enum field but an additional field in the Many-to-Many table that links the Contact and the Opportunity entities and I don't have any examples or guidance to modify this type of column that I could share.
-
hey telecastg
Thanks for you reply.
I have tried changing the field type but it didn't work, i have changed the type of opportunityRole field on contact's clientDefs to multiEnum but the field disappear when i tracked it down it looks like contacts field on opportunity is a custom field which inherits this view (views/fields/link-multiple-with-columns-with-primary) which also inherits (views/fields/link-multiple-with-columns) and on this last view there is only support for 3 columns type (varchar - enum - bool) see attached screenshot. not sure how to this and i would appreciate if you could help in any way.
thanks
Leave a comment:
-
Yes it is possible, check this post for instructions. https://forum.espocrm.com/forum/gene...-to-multi-enum
The most important thing to keep in mind, is that although the actual database field does not change, the contents are handled different, enum stores a string and multi-enum stores a json array which members are the chosen values, thus you will need to manually update the contactRole field in existing records from "role-x" to ["role-x"]
- Likes 1
Leave a comment:
-
Change opportunity's contacts field (make contactRole multi-enum field)
Leave a comment: