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
Salesforce Learning 5Salesforce Learning 5 

inline visualforce page

i have a object called auctions .. in one of its page layouts i have added inline visualforce page, which has a button called "Place Or Update BId" when that button is clicked .. a record should be created in bid object(another object) , for that i  need to get current page field values.. how do i do that ...

how to retrieve current page(standardvf page) field values to controller
Arunkumar RArunkumar R
Arunkumar R
1. Initialize varible in your class

public Id currentPageId;

2. Get record Id in Constructor

public MyController() {

 currentPageId= ApexPages.getCurrentPage().getParameters().get('id');

}

3. Retrieve field values where you want to get, using the currentPageId that you have got using SOQL.

auctions au=[select id,name from auctions where id=:currentPageId];