|
|
直爽的柑橘 · docker run ...· 1 年前 · |
|
|
时尚的胡萝卜 · 【Python】【PyQt5】抖音表白神器 ...· 2 年前 · |
|
|
跑龙套的圣诞树 · Azure Core shared ...· 3 年前 · |
|
|
直爽的伏特加 · json diff patch c#-掘金· 3 年前 · |
|
|
自信的红烧肉 · java - ...· 3 年前 · |
Before going that far, I certain that, You can write a Process Builder on Task to look up its status and create an action to update the related records to selected the account and update it.
Search for the Process Builder in the Setup > Quick Find. Its' a wizard that'll let you pick your Object (Task) and then the corresponding acttions.
I believe this should work for you case.
trigger task_After on Task (after insert) List<Account> AccountsToUpdate = new List<Account>(); for (Task t: Trigger.new) if (t.Status=='Completed') Account a = new Account(Id=t.WhatId); a.Account_completion_Status = t.Status; AccountsToUpdate.add(a); try { update AccountsToUpdate; } catch (system.Dmlexception e) { system.debug (e);