首页 > 其他 > 详细

Dynamice CRM 365 的Plugin容易忽略的知识点,额外容易出错

时间:2020-07-10 12:01:16      阅读:88      评论:0      收藏:0      [点我收藏+]

Dynamice CRM 365 的Plugin容易忽略的知识点,额外容易报错。这里整理了2点:

Entity targetEntity = (Entity)Context.InputParameters["Target"];  //取到传入的实体

1.针对lookup类型,在targetEntity中只能拿到id,拿不到Name

2.针对OptionSetValue类型,想去下拉的描述,必须重新查询,不能直接targetEntity.FormattedValues["new_formstatus"];否则报错:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

技术分享图片

 

Dynamice CRM 365 的Plugin容易忽略的知识点,额外容易出错

原文:https://www.cnblogs.com/parkerchen/p/13278372.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!