![見出し画像](https://assets.st-note.com/production/uploads/images/166567076/rectangle_large_type_2_fb010735b1ee8cdf20922636072071db.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)
※2025年1月出題範囲分類分け実施+新出題範囲に対応 ※最新出題傾向に対応していくため、問題の差し替えを行う事がございます。 Sale…
![](https://assets.st-note.com/production/uploads/images/64489617/profile_d43ebf9cb882c42c754707b2947cb99c.png?fit=bounds&format=jpeg&quality=85&width=330)
解説:認定上級PlatformデベロッパーPACK
※人気の解説講座①~③をパック化いたしました ※2025年1月出題範囲分類分け実施+新出題範囲に対応 ※最新出題傾向に対応していくため、問…
いつもサポートいただきありがとうございます! クリエイター活動の励みになります!