daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Apr 27th, 2016 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dictionary<string, string> parameters = GetCustomParameters(company.Id);
  2. Uri uri = new Uri(parameters["serviceUrl"]);
  3. var username = parameters["username"];
  4. var password = parameters["password"];
  5. var entity = parameters["entity"];
  6. ClientCredentials credentials = new ClientCredentials();
  7. credentials.UserName.UserName = username;
  8. credentials.UserName.Password = password;
  9.  
  10. OrganizationServiceProxy osproxy = new OrganizationServiceProxy(uri, null, credentials, null);
  11. IOrganizationService _services = (IOrganizationService)osproxy;
  12. QueryExpression query = new QueryExpression()
  13. {
  14.     EntityName = entity,
  15.     ColumnSet = new ColumnSet("firstname", "lastname", "emailaddress")
  16. };
  17.  
  18. EntityCollection retrieved = _services.RetrieveMultiple(query);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top