2009-03-12 5 views
0

CRM 4.0 Webサービスインターフェイスを使用してアプリケーションを開発しており、電話による通話レコードをプログラムで作成し、それをアカウントレコードにリンクする必要があります。私はレコードを作成する方法を見ることができますが、私は電話の呼び出しをアカウントにリンクする方法がわかりません。どんな助けでも大歓迎です。CRM 4.0のアカウントにアクティビティをリンクする

おかげ

ナイジェル

答えて

5

あなたが直接(アカウントなど)のエンティティに(電話など)の活動をリンクすることはできません。それを行うには、activitypartyオブジェクトを使用する必要があります。
は、それが(私はアカウントが存在すると仮定しています)次の手順に従ってくださいするには、次の

 phonecall newPhoneCall = new phonecall(); 

     // Set the properties of the newPhoneCall. 
     newPhoneCall.subject = "Test newPhoneCall"; 
     newPhoneCall.description = "New newPhoneCall"; 

     // Create the party sending and receiving the newPhoneCall. 
     activityparty party = new activityparty(); 

     // Set the properties of Activityparty. 
     party.partyid = new Lookup(); 
     party.partyid.type = EntityName.account.ToString(); 
     party.partyid.Value = existingAccount.accountId; 

     // The party sends and receives the newPhoneCall. 
     newPhoneCall.from = new activityparty[] { }; 
     newPhoneCall.to = new activityparty[] { party }; 

は通常どおり電話アクティビティを作成します。