You need to sign in to do that
Don't have an account?
IT Admin 179
soql task
i am trying to do soql on task table:
according to the task from salesforce, according to the picture i posted, how can I retrieve
attribute "name" and "related to" >?
thank you!
would you mind marking the question solved (Best Answer) if it helps you out or solves the query.. Since it will helps other users who falls under similar situation.
Thank You much sir!
All Answers
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_erd_activities.htm
On task obejct field named "Relate To" has backend API name as WhatId. And field named "Name" has API name as WhoId.
So, let's say you want to retrive all the tasks inside the database with their RelateTo and Name field info then I would invite you to take a look on the below query.
Also keep in mind that WhoId is always from either LEAD or CONTACT. But for all others such as Account, Opportunity, Case etc.. its WhatId.
Now, if you get a Id then how would would you kow which object is it from?
There is a function in salesforce with allows us to find this out. Somethig along the following lines..
Hope this helps and if it answers your question then please mark it as best answer!
Line: 8, Column: 12
Illegal assignment from Schema.SObjectType to String
please help!
Good catch! Here we go. I have tried this one out in my org and I am getting currect out put.
First I have created a task under the Lead object and got the below output.
Then I have created a New task on an Opportunity obj and here got the below output.
Hope it helps and if it solves the question then please mark it as best answer!
would you mind marking the question solved (Best Answer) if it helps you out or solves the query.. Since it will helps other users who falls under similar situation.
Thank You much sir!