Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This code block retrieves an Account record from Salesforce.

Code Block
languagec#
SalesforceSession salesforceSession = new SalesforceSession(
    new LoginDetails("username@example.com", "salesforcePassword"));
AccountService accountService = new AccountService(salesforceSession);
   
string accountNameToFind = "Zoo Creations";
Account matchingAccount = accountService.GetSingleByFieldEquals("Name", accountNameToFind);
Assert.IsNotNull(matchingAccount);
Assert.AreEqual(accountNameToFind, matchingAccount.Name);