發表文章

目前顯示的是有「api version」標籤的文章

這個欄位明明就存在啊,為什麼一直得到 error message: "Variable does not exist: ContactId"

圖片
情境 我在 Opportunity Trigger 裡寫了很簡單的 code,使用到 ContactId 這個 field。 for ( Opportunity opp : Trigger . new ){ if ( opp . ContactId != null ){           // Some actions } } 但是要從 VSC deploy 上 sandbox 的時候,被這個 error 給卡住: Variable does not exist: ContactId   原因 我這支 trigger 的 API version 太舊了,沒有支援到這個欄位。 解法 把 API version 升級到 46.0 以上即可。