Is it possible to add Multiple Relationship Field of Same Module?

For Example, Opportunity Module have Many-to-Many Relationship with Account Module. I want to Create the Same Custom Field with a Relationship in Opportunity Module. Currently I’m able to Create a Custom Field. Now i want to add Custom Field in Editview Layout but Custom Field is not showing in Studio for adding in Editview

Hi Urvi!

i am sorry but I am confused with your explanation, sometimes you talk of the field as if it was a relationship…?

Can you specify exactly in which module, which exact type of field you’re talking about at each moment? Thanks

Like @pgr said, it would help if you described exactly what you are trying to accomplish. I’ll give you some pointers though.

Note that fields and relationships are two distinct concepts. If you were to add a Relate field in the Studio’s “Fields” administration, you’d not be creating a relationship. If you wanted to use a Relate field and create a relationship based on that, you’d need to write a before_save logic hook to create that relationship. You’d still need to create the relationship in Studio though.

If you were adding a relationship as per Studio’s “Relationships” area, you’re not creating any fields. The type of relationship determines how they are added to views and how you can customize them in the “Layouts” section of the studio.

If you created a many-to-* or a *-to-many relationship, you wouldn’t see it as a “field” in layout settings on the “many” side of the relationship (if you created many-to-many, you’d see it on neither end), because the relationship is shown as a subpanel in the bottom of DetailView. You can customize the fields shown in the subpanel in the “Subpanels” section of “Layouts” for the module on which the subpanel is shown.

Only one-to-* or *-to-one relationships are shown in the EditView and DetailView layouts for the “one” end of the relationship (for one-to-one, you’d see it on both ends), because those relationships act like fields in layouts.

As for multiple relationships, AFAIK there is nothing to stop you from adding multiple relationships between the same module pair. Keep in mind though that the Studio’s capabilities in customizing those relationships is somewhat limited and makes it hard to discern between “parallel” relationship. Also if you were planning to write custom code to accompany your relationship, you should note that certain relationship-related functions might not behave as expected.

1 Like

Thanks Guys
I am looking for like,
I want to Create Many-to-Many Relationship between Opportunity and Account Module. By Default SuiteCRM Provide Relationship between this two modules. So I want to create one more many-to-many relationship between Opportunity and Account Module
Please help

you can add n:m relationships in the studio, but you won’t get a field that is shown on the UI, in both modules a subpanel will be shown instead (since it’s a many-to-many relationship).