Deploying Custom Field and Custom Object Through Change set
Create a Custom object:- There are various ways of creating an Object either you can create from UI or Schema Builder. The Process for creating Objects from UI and schema builder is given below:-
- Go to the Object Manager tab.
- Click on the button “Create Custom Object”.
- Enter the Object name and Record Name fields auto-fill.
- Scroll down and check the checkbox “Launch New Custom Tab Wizard after saving this custom object or any Option as required”.
- Click the Tab Style field and select the style you like on the New Custom Object Tab page.
- Click Next.
- Again click on Next.
- Click on Save.
Create a Custom Field:- There are various ways of creating a field Either you can create from UI or Schema Builder. The Process for creating fields from UI and schema builder is given below. First from UI;-
- Open the Object Fields page.
- Click + Add Custom Field.
- Write the name the field
- Select the field type from the dropdown.
- Don't change the custom field ID.
- Choose optional field settings.
- When finished, click Create custom field.
- Click on Save.
Don't forget to check out: Concept of Virtual and Abstract Modifiers in Apex | Salesforce Developer Guide
Steps to Create Fields With Schema Builder
- Creating the fields with the Schema Builder is a bit like creating objects in UI.
- From the Elements tab, select a field type and drag it onto the object in which you want to create a field in it.
- Take note that you just can make relationship fields, formula areas, and ordinary areas in Schema Builder.
- Fill out the various details about your new field.
- At last click on Save.
There are 4 steps for Change Set. We must have to follow these steps:-
1.We have to create an outbound change set in the first org/Sandbox.
2.Add the components to the change set in the first org/Sandbox.
3.Upload the outbound change set from first to second org.
4.At last, Deploy the inbound change set in the second Org.
Step First: We need to make an outbound change set in the first organization/Sandbox
Go to the "Setup" in organization/Sandbox
Enter the content "outbound change set" in srom search box.
Pick the outbound change sets.
From that point forward, You will be diverted to the Change set alter page.
Give Any Name and its Description and snap on the Save button.
Step Second: Add the component to the changeset in the first organization/Sandbox-
Snap-on the add button on the Change set component then you will be diverted to add to the change set page.
Presently Select Custom Field and Custom Object that you need to relocate from Component type.
Snap-on the "Add to change set" button
To transfer this change set, click on the "transfer" button and select the objective organization or second organization where you need to relocate these Custom Field and Custom Objects.
Step Third: Upload the outbound change set from first to second organization
Presently login to your second organization, Go to the inbound change set where you can see the inbound change set.
Snap-on the "validate" button.
All progressions will be submitted, Once the arrangement is finished effectively.
Step Fourth: At End, Deploy inbound change set in the second Org.
Presently, Go to custom Field and Custom Object and select the Custom Field and Custom Object that was sent in the second organization or Sandbox and click on Deploy.