You need to sign in to do that
Don't have an account?
Everton CP7
Create task in same related to
Hi there,
I made a code to create a task when another task have fotos_encontradas__c == 'NÃO'.
The code works fine, but whatid is not the same.
How I made my task open in same whatid?
trigger CriarTarefa_Pendencia_Duomind_Enviar_novamente_as_foto on Task (after update) { List<Task> task = new List<Task>(); for (Task newTask: Trigger.New) if (newtask.fotos_encontradas__c == 'NÃO' && newtask.subject == 'Pendência Duomind' && newtask.status <> 'Concluído'){ task.add (new Task( Subject = 'Pendência Duomind - Enviar novamente as fotos', Status = 'Não iniciado', ActivityDate = Date.today(), OwnerId = '005U0000000EtIH')); } insert task; }
Thanks !
I don't see where you are trying to set the what ID at all.
Perhaps something like this is what you need: WhatID = :NewTask.WhatID
All Answers
I don't see where you are trying to set the what ID at all.
Perhaps something like this is what you need: WhatID = :NewTask.WhatID
I don't believe !!!
I forgot this...
Thanks Colemab !
No problem. Don't forget to give Kudos for correct answers and helpful posts :-)