function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Julie CurryJulie Curry 

Would like to remove a custom relationship between opportunities and cases

Hi,

My organization has cases as a related list on our opportunity object. This is some customization that was created before I joined the organization. The relationship is adding cases to opportunities that they are not related to. I'd like to remove this relationship, but I can't find where I can do this.

Can you guys please help with this?

AshlekhAshlekh
Hi,

If there is a lookup on case object of opportunity and you want to break the relatation ship between them then first update all the case recrod with null value of lookup field of opportunity. And remove the reference of field  from components where you are using that relationship field. In last delete the field.


Julie CurryJulie Curry
Hi Ashlekh,

Thank you for your response.  There isn't a lookup field.  That is part of the problem.  I checked the fields in the case object.  It doesn't exist. 
I can't figure out what is creating the relationship.  Any idea?  Someone told me it might be an API or APEX.  I checked in those areas too and I don't see anything.  

Any thoughts that might help me figure out what's going on would be greatly appreciated.

Thanks for your time.

best,
Julie

AshlekhAshlekh
Hi,

I think there should be a junction object which having case id and opportunity id. 

Other wise how could it will be possible that there is relaed list under opportunity of case but there is no any field on case which keep the id of opportunity.

Please find properlty you will get some thing,.
Julie CurryJulie Curry
Hi Ashlekh,

Thanks for your response.  I'm an Admin so I have just been looking for lookup and other straightforward options.  I don't know where I would find this junction object.  

I checked the opportunity object, I don't see anything connecting it to cases.  I checked the case object and I don't see anything connecting it to opportunities.  

Where would I find it?

best,
Julie
Julie CurryJulie Curry
Hi Ashlekh,

I spoke to Salesforce support and it turns out that the case-opportunity relationship is an out-of-the-box option.  Since cases and opportunities are both objects under the account salesforce allows you to add a related list of cases to the opportunity page layout.  Personally, I don't see the advantage of displaying every single case for an account underneath an opportunity it may not be related to.  Seems misleading to me.

Just wanted to let you know in case that is at all helpful to you in the future.

best,
Julie
AshlekhAshlekh
Thanks Julie Curry to update me.