You need to sign in to do that
Don't have an account?
Tristan Baker
Maximum depth exceeded error
Hello,
I can't figure out what the problem is. What's weird is that I've successfully created my schema in my sandbox environment with no issues. I attempted to deploy my custom objects just now, and i recieved a similar looking error.
Service_Repair_Line_Item__c.Product_Repair_Line_Item__c Custom Field 65 13 maximum depth of master-detail relationship exceeded
Service_Repair_Line_Item__c Custom Object Cannot set ControlledByParent on a CustomObject without a MasterDetail relationship field
I've included a screen shot of the schema I've created at the bottom of this post. I count only 5 chained master-detail relationships: Accounts->Contact->Service Order->Product Repair Line Item->Service Repair Line Item. Elsewhere on this forum (https://success.salesforce.com/answers?id=90630000000h1QXAAY), i've seen some references to the fact that 5 is the maximum depth of a Master-Detail relationship, so it would appear I am within that limit I don't understand why its complaining during the production deployment but isn't complaining in my sandbox. I also don't understand why it complaining about just the Service Repair Line Item, because there are 3 other sibling objects that live at the same depth. Is it possible that there is a different limit in the sandbox than there is in the production environment?
I can't figure out what the problem is. What's weird is that I've successfully created my schema in my sandbox environment with no issues. I attempted to deploy my custom objects just now, and i recieved a similar looking error.
Service_Repair_Line_Item__c.Product_Repair_Line_Item__c Custom Field 65 13 maximum depth of master-detail relationship exceeded
Service_Repair_Line_Item__c Custom Object Cannot set ControlledByParent on a CustomObject without a MasterDetail relationship field
I've included a screen shot of the schema I've created at the bottom of this post. I count only 5 chained master-detail relationships: Accounts->Contact->Service Order->Product Repair Line Item->Service Repair Line Item. Elsewhere on this forum (https://success.salesforce.com/answers?id=90630000000h1QXAAY), i've seen some references to the fact that 5 is the maximum depth of a Master-Detail relationship, so it would appear I am within that limit I don't understand why its complaining during the production deployment but isn't complaining in my sandbox. I also don't understand why it complaining about just the Service Repair Line Item, because there are 3 other sibling objects that live at the same depth. Is it possible that there is a different limit in the sandbox than there is in the production environment?
Please send me your production and sandbox org IDs at ssrivatsavaya@salesforce.com and I will check the existing limits for you.
Thanks,
Shashank
The resolution is to add the "MasterDetail relationship field" into the change set, even if you haven't changed it or the Sharing / OWD.
I'm assuming if you don't have the custom field in your package / object in the IDE either, then you'd probably get the same error.