How to find the id ...
 
Notifications
Clear all

[Solved] How to find the id of a page in Salesforce

2 Posts
1 Users
0 Likes
561 Views
Posts: 192
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

How to find the id of a particular visualforce page in Salesforce?

Issue Tags
1 Reply
Posts: 192
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

Lets say you wan to find out the id of the opportunity from a visualforce page:

public class YourClass {

    public string OppId{get;set;} // To capture Opportunity Record Id (Dynamic)

    // constructor
    public YourClass (apexpages.StandardController sc) {
        OppId=apexpages.currentPage().getparameters().get('id'); 
        system.debug('opportunity id'+ OppId);
    }
}
Reply
Share: