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

How to use Visualforce code in custom object

I have created app related to university.In this for Student object I need to show some information in one table with 4 columns.So I created table.But now I want to show this table to my Students tab(Object:Student).I created a section named course details on Student object,in this section I want to show this table.So how can I use my visualforce code there?

I tried overriding by using  'Buttons, Links, and Actions' but then it's come up with just a one section(only VF code).
I have two section in my tab  (1. Student Detail ,2.Course Detail) . And I want to replace this Course Details section  with my VF code. And want to keep Student Detail section as it is.
Please guide.

You can add visualforce page in page layout but it should be standard set controller with student object. 
1. go to student pagelayout
2. click on edit
3. goto visualforce page and add into layout. 
Step 1: Create visualforce page, standardController should be Student.
This step will help the page to appear in the list of pages that can be added as inline to the Student object layout.

Step 2: Edit reespective layout of student object.
Step 3: Remove all fields in Course Details section, add the VF page you created in there. Optionally, set the layout type a 1 column.

Hope it helps!

Thanks for reply.
I have created custom object (Student).So it shouldn't allow to create standardController.
It's showing following error:
Error: Student does not exist