AnsweredAssumed Answered

Is it possible to convert a relate field to a multienum?

Question asked by Steve Rose on Aug 4, 2017
Latest reply on Dec 13, 2017 by Eka Indra

Currently I have a custom module ('Brands') with a many to many relationship to the Contacts module. 

 

The desired outcome is for it to be a multienum to allow the user to select multiple brands via the dropdown of which, on save, will each be related to the Contact rather than just a single brand which the default relate field provides.

 

I realise this can be done via the subpanels by linking existing records however the multi-select is dynamic in that it is populated by Javascript with particular values so we'd like it to be a multi enum on the form itself. Essentially when the user selects from the 'Accounts' relate field it then populates the 'Brands' dropdown with the related brands (it also filters based on a few other custom fields) to that account. The same thing happens for another multi select on the page as well after 1 or more brands are chosen. 

 

I have so far tried simply adding a relate field to the page through studio and then altering the vardefs by setting the type to 'multienum' and setting 'isMultiSelect' to true but this doesn't seem to work. You can select multiple brands but you don't seem to be able to edit the field after that and the overall save fails. I'm wondering if anyone has tried to achieve this before.

 

I am using Sugar 7.9.0.

 

Any help would be appreciated. 

 

Thanks,

Steve

Outcomes