The business would like the ability to add multiple 'Market Segments' to a Company. I want to achieve this by placing a Sub-Grid on the Company form. I created the 'Market Segments' entity, with 21 Market Segment values, created a 1:N relationship from Company:Market Segment, and added the Market Segment Sub –Grid on the Company Form.
When testing to add multiple Segments to the Sub-Grid for a Company this works fine, but when I try to add the same Market Segment value ‘Aerospace’ to another Company, I get the above error: 'Error: The record is already associated with another record'.
What am I missing here? I should be able to add the same Market Segments to different Companies. I know I am missing something simple.
Thanks.
*This post is locked for comments
Try to remove 1:n relationship first then create n:n relationship if not in configured in your entity then you cloud be able to use a sub-grid in your main entity to add as mush as you want the records.
i test it it works.
Hi Christopher,
I agree with Guido and Aaron.
You should need the N:N Relationship (can be manual or native N:N)
Explanation:
"When testing to add multiple Segments to the Sub-Grid for a Company this works fine, but when I try to add the same Market Segment value ‘Aerospace’ to another Company, I get the above error: 'Error: The record is already associated with another record'"
Yes, because you have 1: N Relationship from Company to Market Segment.
And it means in the Market Segment perspective is N:1 Relationship.
So, It means 1 Company can have multiple Market Segment (1:N Relationship is correct).
But, 1 Market Segment can only have 1 parent Company.
First, you have set the Aerospace to Company A, then you want to set Aerospace to Company B, which is not allowed.
To check and ensure, you can go to the Market Segment record: Aerospace, see the field company (it is should be a lookup field to the company), you should see the company A has been there, so that you cannot tie the Aerospace to another company.
Then, to make the Aerospace can have multiple Company tied to, then you need to create a N:N relationship between them.
Hope this helps you.
Thanks!
Hi Christopher Bradley,
Try Using N:N relationship between them
Agreed with Guido. In terms of what your CRM forms will look like at the moment:
1) A sub-grid will be showing on the Company form.
2) A lookup will be showing on the Segment form.
With this 1:N relationship, if you look at the Segment form you'll only see the option to add one Country, whereas if you implement the relationship described by Guido, then you will have a sub-grid on both the Company and the Segment entity.
you need to use a N:N relationship, not a 1:N
a Company can have N Segments, the same Segment can be associated to N Companies.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156