Dynamics CRM Plugin 刪除事件實體獲取

在Plugin中執行刪除事件時,時無法獲取到當前實體的Entity,只能獲取到當前實體的EntityReference.

正確寫法:

  EntityReference targetEntity = (EntityReference)plugin.Context.InputParameters["Target"];

錯誤寫法

 Entity targetEntity = (Entity)plugin.Context.InputParameters["Target"];

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章