![見出し画像](https://assets.st-note.com/production/uploads/images/129245936/rectangle_large_type_2_c8953642668f53b00373a09aed3f4815.png?width=1200)
第46問:Salesforce認定上級Platformデベロッパー
本講座はSalesforce認定上級Platformデベロッパー試験の過去問、模擬問題の解説を行なっております。
問題
Visualforce検索ページで使用されるRemoteActionを定義する下記Apexクラスを作成しました。リモートアクションが正しいアカウントを返したことを判断するコードスニペットはどれですか?
global with sharing MyRemoter{
public String accountName {get;set;}
public static Account acc{get;set;}
public MyRemoter(){}
@RemoteAction
global static Account getAccount(String accountName){
acc = [SELECT Id,Name,NumberOfEmployees FROM Account WHERE Name=: accountName];
return acc;
}
}
□ Account a = controller.getAccount('TestAccount');
System.assertEquals( 'TestAccount', a.Name );
□ MyRemoter remote = new MyRemoter();
Account a = remote.getAccount('TestAccount');
System.assertEquals( 'TestAccount', a.Name );
□ MyRemoter remote = new MyRemoter('TestAccount');
Account a = remote.getAccount ();
System.assertEquals( 'TestAccount', a.Name );
□ Account a = MyRemoter.getAccount('TestAccount');
System.assertEquals( 'TestAccount', a.Name );
正解
ここから先は
![](https://assets.st-note.com/production/uploads/images/64489617/profile_d43ebf9cb882c42c754707b2947cb99c.png?fit=bounds&format=jpeg&quality=85&width=330)
Salesforce認定上級PLATFORMデベロッパー試験の資格取得を目指す方向けの講座です。 過去問、サンプル問題に対する解答+解説を…
![](https://assets.st-note.com/production/uploads/images/64489617/profile_d43ebf9cb882c42c754707b2947cb99c.png?fit=bounds&format=jpeg&quality=85&width=330)
解説:認定上級PlatformデベロッパーPACK
Salesforce認定上級Platformデベロッパー試験の資格取得を目指す方向けの講座です。 過去問、サンプル問題に対する解答+解説を…
いつもサポートいただきありがとうございます! クリエイター活動の励みになります!