在 Plugin Dynamics CRM 2015 中添加数字

Add numbers in Plugin Dynamics CRM 2015

如何编写代码以从 LEAD 表单的两个字段中添加两个数字并将结果放入 Dynamics CRM 2015 online 中同一表单的第三个字段中?我正在创建一个插件,没有类似 (entity.setAttribute) 的功能,但有一个功能 (entity.getAttribute)。所以我没有把结果放在第三个字段中。

Entity 的方法 SetAttributeValue 受到保护,因此无法访问。

只需使用以下语法:

myEntity["calculatedFieldName"] = 1 + 2;