After reading this blog you will get the knowledge on how to create the Custom Object and also how to create the dynamic form on custom object on layout basis as well as on profile level basis.
It's not just we can create the Dynamic form on Standard Object. Salesforce provides the facility to create the dynamic form on Custom Object also.Custom objects are objects that you create to store information that's specific to your company or industry.
How we can use Dynamic forms on Custom Objects:
Steps to create the Custom Object:
1. Got to Setup option->Click on Object Manager tab->Click on Create-> Create Object option.
2. Give all the details in the window and Click on Save button.
So here the Object is Ready. Let's create some fields in the created Object:
Open the created Object->Click on Fields and Relationships->Click on New button->Select the data type as checkbox->Click on Next button-> Give all the information as Field label “Isavailable” and default value as Unchecked->Click on Next button->Give access to all the Users->Click on Next button->Click on Save and New button.
In the same way you can create multiple fields by your choice.
Guys, Apart from “Isavailable” field I have created “Text field 1 and Text field 2 “ also for giving the knowledge on creation of Dynamic forms.
Creation of Tab for the created fields:
1. Click on Home option->Click on Tab->New->Choose the Object created(Dynamic form Object)->Click on Next button.
2. On the “New Custom Object Tab” page click on the “Next” button.
3. On the “Add to custom apps” option click on Save button.
4. Click on Apps icon and search for “Dynamic form object”
5. Create the New record.
You can see like on the dialogue box the Isavailable option with unchecked is available.
The below form is the simple page layout.
6. Just give some details and save it.
Lets convert this Page layout to the Dynamic form Page layout:
1. From the record page click on the “Edit Page” option.
2. Click on Detail Page as below:
3. Click on Upgrade now option from left pane:
4. Check the “Skip this step Next time” option and click on Next option.
5. Select the Layout option and click on the Finish button.
6. Now let's give the Conditions on fields for its visibility.From the right side pane click on the “Add filter” option.
7. Give the condition below and click on the Done option.The criteria data will get saved successfully:
8. In the same way, give the criteria for “Text field 2” option also.
9. Click on the “Save” button.
10. Click on the “Activate” option from the dialogue box.
11. Click on the “Assign as org default” option.
12. Select the option “Desktop and phone”->Click on Next button->Click on Save option.
13. Click on the “Save” option in App builder.
14. Now go to the “Dynamic form Object” page and see the magic that how Layout got converted into Dynamic form.
By default the “Text field 1 and Text field 2” will not be visible.As we have provided the criteria so the Page will be displayed as Dynamic form.
15. Just click on the “Isavailable” option and all the two fields will be visible.
Concludally, The two fields will be visible based on checking of “Isavailable” option.
Just give the data in the “New dynamic form object” dialogue box and save it and the new record with the details given will get created.
How to create the Dynamic form in respect with Username/Profile Restrictions:
1)Just open the Object record page.
2) Click on the Edit Page.
3)Put the Focus on the layout.
4)From the right side pane click on the “Add filter” option.
5)Click on the Advanced option and then click on the “Select” option.
6)Give the criteria details in the “Select field” dialogue box.
7)Click on the “Done” option.
8)Give all the conditions and click on Save option.
So only the Username which is mentioned will be able to see the Dynamic form layout.