This is my first coding of CRM, I am trying to connect my Microsoft Dynamic 365 for Customer Engagement trial version.
from here: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/org-service/quick-start-org-service-console-app
static void Main(string[] args)
{
string url = "testtoronto.crm3.dynamics.com/main.aspx";
string userName = "mike@testtoronto.onmicrosoft.com";
string password = "test1234$";
string conn = $@"
Url = {url};
AuthType = Office365;
UserName = {userName};
Password = {password};
RequireNewInstance = True";
using (var svc = new CrmServiceClient(conn))
{
WhoAmIRequest request = new WhoAmIRequest();
WhoAmIResponse response = (WhoAmIResponse)svc.Execute(request); // here is not compiled, "object variable not defined"
Console.WriteLine("Your UserId is {0}", response.UserId);
Console.WriteLine("Press anykey to exit.");
Console.ReadLine();
}
}
Sorry, this is my first CRM coding, Can anybody help me to fix it? much appreciated!
*This post is locked for comments