2016-12-16 1 views
-2

これは電子メールを送信するためのコードです。アカウントエンティティからの活動でCRMから電子メールを取得する

private void SendEmail(Guid accountToGuid) 
    { 
     string name = GetName(service, accountToGuid); 

     #region Email 
     Entity fromParty = new Entity("activityparty"); 
     fromParty["partyid"] = new EntityReference("systemuser", ownerId); 
     Entity toParty = new Entity("activityparty"); 
     toParty["partyid"] = new EntityReference("account", accountToGuid); 

     Entity Email = new Entity("email"); 
     Email.Attributes["from"] = new Entity[] { fromParty }; 
     Email.Attributes["to"] = new Entity[] { toParty }; 
     Email.Attributes["subject"] = "Hello " + name; 
     Email.Attributes["description"] = "Your account has been confirmed by Admin"; 
     Email.Attributes["ownerid"] = new EntityReference("systemuser", ownerId); 
     Guid EmailId = service.Create(Email); 

     SendEmailRequest req = new SendEmailRequest(); 

     req.EmailId = EmailId; 
     req.IssueSend = true; 
     req.TrackingToken = ""; 

     SendEmailResponse res = (SendEmailResponse)service.Execute(req); 
     #endregion 
    } 

私は既にアカウントに電子メールを送っています。アクティビティセクションにメールが表示されます。 SDKから検索するには?

+1

どのSDKですか?何を試しましたか? –

+0

crm sdk 2016 ..私はcrmに直接接続するウェブサイトを作成することを意味します。どのようにそれを行うにはどのようなアイデア?またはプラグイン? –

答えて

1

あなたがいずれかの実行する必要があります。

(リンクでは全例)

Retrieve - あなたはすでにあなたのケースではレコードID、電子メールIDがわかっているとき。

RetrieveMultiple - レコードIDがわからないのに、他の条件に基づいて検索する場合などです。アカウントIDに関連する電子メール。

関連する問題