📜  apex get recordid - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:33.351000             🧑  作者: Mango

代码示例1
public class myExtension {

    public Opportunity currentRecord{get; set;}
    
    public myExtension(ApexPages.StandardController controller) {
        currentRecord = [SELECT Id, Name, Amount FROM Opportunity WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
    }

}