You need to sign in to do that
Don't have an account?
Pranav Mandlik 16
task not creating under accounts
I am new to salesforce i am writing trigger test class, i want to create task under account but after execution of this trigger is passes the test but task is not creating under account i have written test code for a trigger
the task is not creating under that account i dont know whats the problem
please share any ideas over this
Account account = [select Id,ownerId from Account limit 1]; Task t = new Task(); t.whatId = account.Id; t.subject = 'Email'; t.OwnerId = account.ownerId; t.status = 'In progress'; t.priority = 'Normal'; insert t; String type = [select Id,Type from task where Id =:t.Id].type; system.assertEquals('Email', type);
the task is not creating under that account i dont know whats the problem
please share any ideas over this
Abdul Khatri
You first need to insert an Account
Raj Vakati
try this code
Raj Vakati
Use this code pls