Skip to main content
Abdel Naji (Sopra Steria) 님이 * Lightning Now! *에 글을 올렸습니다

Hi ,

 

I saw in trailhead that I must create a Server-Side Controller to get or save any record in our org. So I need to get a current record Id in this Server-Side Controller but I can't do it ! (This is because of "@auraenabled" ? )

 

The method below doesn't work :

 

public with sharing class myClass{

 

@AuraEnabled

public static Lead getLead() {

 

return [SELECT Website, Phone FROM Lead WHERE Id = :ApexPages.currentPage().getParameters().get('id')];

 

}

 

}

 

Thanks.

#JS_Alternatives 

댓글 2개
0/9000