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
Niya AdminNiya Admin 

master object

Hello all,
I created a new custom object and I want to add a master object. Can you help me how can I do it?

srlawr uksrlawr uk
If you want to add a Master to the new object you have made, from Object detail page under "Custom Fields and Relationships" - select to make a new field, and as the field type, select Master/Detail Relationship and then follow the wizard through to pick the parent/master and set the name etc.

When you build a relationship in Salesforce - you always do so from the child... as what you are doing is telling the object what it is governed by. 

So just to clarify, if you want your new object to be the master of another, you would go through the above process, then choosing your custom object from the dropdown on step 2.

srlawr uksrlawr uk
BTW. to get to the Object detail page, from Setup expand "Object" (classic) or "Object Manager" (LEX) and then scroll through to find your custom object.