gpt4 book ai didi

c# - 无法以编程方式更新社交个人资料上的 InfluenceScore

转载 作者:太空狗 更新时间:2023-10-29 19:45:14 26 4
gpt4 key购买 nike

我们有一个新设置的 CRM 2015 On-Premise 环境;我们正在摆弄 the Social Care framework .

我们只是想使用网络服务调用在我们的自定义应用程序中更新社交资料记录的 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);
  • Social Care Framework 是否允许从外部更新 InfluenceScore
  • 如果可以,正确的做法是什么?

最佳答案

我查看了 socialprofile 实体的元数据,发现 influencescore 属性有其 IsValidForUpdate属性设置为 False。它可以在创建时设置(即 IsValidForCreate 为 True)。

关于c# - 无法以编程方式更新社交个人资料上的 InfluenceScore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30646034/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com