Hi,
Add null check condition in MoveTheNotes method before for each on EntotyCollection
if(opportunity!=null)
Get annotation returns Notes but you are naming the EntotyCollection object variable to Opportunity, please rename to Notes for better readability
Thankyou for replay
Hi,
You refer the wrong object in the object id.
Bonus: You can also improve the readability of your code by renaming your variables.
If the error persists, can you share the error log ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,564 Super User 2024 Season 2
Martin Dráb 228,651 Most Valuable Professional
nmaenpaa 101,148