0
CRMと通信するためにC#を使用してWeb APIを構築しました。私は口座を取り戻すことに成功しました。私がしたいのは、CRMからイベントを取得することです。私はcrmのイベントのエンティティを作成しなければならないと思いますが、どうすればいいのですか?CRM 2011でイベントのエンティティを作成
これは、CRMのカスタマイズおよびソリューションを経由してアカウントのコード
ColumnSet colsPrincipal = new ColumnSet("lastname", "firstname", "domainname", "systemuserid", "businessunitid");
QueryExpression queryPrincipal = new QueryExpression();
queryPrincipal.EntityName = "event";//systemuser
queryPrincipal.ColumnSet = colsPrincipal;
var myAccounts = CommonCrm.crmContext.RetrieveMultiple(queryPrincipal);
foreach (var myEntity in myAccounts.Entities)
{
//create new crm users and add it to the list
CrmUser thisOne = new CrmUser();
thisOne.firstName = myEntity.GetAttributeValue<string>("firstname");
thisOne.lastName = myEntity.GetAttributeValue<string>("name");
thisOne.userId = myEntity.GetAttributeValue<string>("domainname");
thisOne.userGuid = myEntity.GetAttributeValue<Guid>("systemuserid");
thisOne.buId = myEntity.GetAttributeValue<EntityReference>("businessunitid").Id;
// and so on and so forth...
Console.Write(thisOne.firstName + " " + thisOne.userGuid + " " + thisOne.lastName);
CrmUsers.Add(thisOne);
arra.Add(thisOne.firstName);
}
私はすでにイベントエンティティを持っていますが、デフォルトのCRMが付属していますが、このように指す方法を見つけることができません: queryPrincipal.EntityName = "// systemuser"; –