ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 24 - Certified Platform Developer II discussion

Report
Export

Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount

(String acccuntName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account; } } Consider the Apex class above that defines a RemoteAction used on a Visualforce search page. Which code snippet will assert that the remote action returned the correct Account?

A.
MyRemoter remote = new MyRemoter();Account a = remote.getAccount ({'TestAccount');System.assertEquals, 'TestAcccunt', a.Name -;
Answers
A.
MyRemoter remote = new MyRemoter();Account a = remote.getAccount ({'TestAccount');System.assertEquals, 'TestAcccunt', a.Name -;
B.
Account a = MyRemoter.getAccount ('TestAccount'):System.assertEquals{ 'TestAccount', a.Name };
Answers
B.
Account a = MyRemoter.getAccount ('TestAccount'):System.assertEquals{ 'TestAccount', a.Name };
C.
MyRemoter remote = new MyRemoter('TestAccount'};Account a = remote.getAccount {);System.assertEquals(, "TestAccount', a.Name -;
Answers
C.
MyRemoter remote = new MyRemoter('TestAccount'};Account a = remote.getAccount {);System.assertEquals(, "TestAccount', a.Name -;
D.
Account a = controller.getAccount('TestAccount');System.assertEquals(, 'TestAccount', a.Name } ;
Answers
D.
Account a = controller.getAccount('TestAccount');System.assertEquals(, 'TestAccount', a.Name } ;
Suggested answer: B
asked 23/09/2024
Antonio Carlos Figueiredo Junior
50 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first