You need to sign in to do that
Don't have an account?
charan@apps
getting values of contact to task
Guys,
I cannot get contact field from task object.
I am trying to get the phone number of contact from task.
i am using this code:
Task obj= new Task();
obj=[select id, subject, who.name from task];
I can get name from contact to task, but I cannot get mobile phone form contact to task.
Please suggest me, how to retrieve mobilephone field on contact object to task.
Task Tobj = [Select Who.Phone, Who.Name, WhoId From Task limit 1]; // Who.Phone fetch the blank value even if data is there
Contact Cobj = [Select Phone, Name From Contact where id=:obj.WhoId]; // So query this to get the phone value
The problem is with the relationship between objects. If we print the {!Tobj.Who.Phone} it always give the null value. So I think it is a schema level problem.