を使用して ExtendedDetails の値を取得/設定する必要があります.Value
。
var extendedDetail = contact.ExtendedDetails[fieldName].Value;
if (extendedDetail == null)
{
contact.ExtendedDetails[fieldName].Value = "VALUE"
}
ご参考までに、ドキュメント「Audience Manager .NET API」(chm) を参照し、「ExtendedDetail」クラスでいくつかの例を確認してください。
更新: ExtendedDetails が null になるシナリオは見たことがありません。連絡先を作成し、拡張データの詳細を取得するために、次の最小限のデータでテストしました。必須で の一部であるIDENTIFICATION_KEY
必要がある連絡先を作成する場合、このシナリオに遭遇することはありません。IDENTIFICATION_SOURCE
ExtendedDetails
//Create a Contact with basic data..
Contact contact = new Contact();
contact.EmailAddress = "abc@123.com";
contact.SubscriptionStatus = SubscriptionStatus.Subscribed;
contact.ExtendedDetails["IDENTIFICATION_KEY"].Value = "abc@123.com";
contact.ExtendedDetails["IDENTIFICATION_SOURCE"].Value = "Website";
contact.Save();
// UPDATE the User Profile ..
ContactId = new string [] { "abc@123.com", "Website" };
Contact contact = Contact.GetFromContactIdentificatonKeys(ContactId);
contact.ExtendedDetails["NAME"].Value = "NAME";
Contact の作成方法に関するコードを投稿できますか?