8

新しくセットアップされた CRM 2015 オンプレミス環境があります。また、ソーシャル ケア フレームワークをいじっています。

Web サービス呼び出しを使用して、カスタム アプリケーション内でソーシャル プロファイル レコードのInfluenceScoreパラメーターを更新したかっただけですが、フィールドには影響がないようです。奇妙なことに、例外はスローされず、サービス呼び出しはまったく文句を言いません。フィールドが更新されていないことを除いて、すべてが正常に見えます。

これが私たちのコードの関連ビットです。

// Retrieving the social profile record with all it's columns
Entity socialProfile = GetSocialProfileByName(socialProfileName);

double score = 0;
string scoreField = "influencescore";

// If socialProfile contains our attribute, set it appropriately, otherwise add the attribute
if(socialProfile.Contains(scoreField)) 
{
    score = socialProfile.GetAttributeValue<float?>(scoreField).GetValueOrDefault(0) + 10; // Add 10 to the existing score.
    socialProfile[scoreField] = score;
}
else 
{
    socialProfile.Attributes.Add(scoreField, 10);
}

// Update the record.
service.Update(socialProfile);
  • ソーシャル ケア フレームワークはInfluenceScore外部からの更新を許可していますか?
  • もしそうなら、それを行う適切な方法は何ですか?
4

1 に答える 1

2

socialprofileエンティティのメタデータを調べたところ、 influencescore属性のIsValidForUpdateプロパティが False に設定されていることがわかりました。ただし、作成時に設定できます (つまり、IsValidForCreate は True です)。

于 2015-08-06T03:57:50.210 に答える