You need to sign in to do that
Don't have an account?
SOQL problem
Create a 'Sales Team' as a related object to 'Lead'...So lead will be parent and Sales Team will be child.
Sales Team Fields :
Team Member (Looup to user)
Role-(Lookup to role)
* Write a SOQL Query to get the Team member and his role for particular lead owner
* Using data loader extract the same data what you are getting in SOQL Query.
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
Sales Team Fields :
Team Member (Looup to user)
Role-(Lookup to role)
* Write a SOQL Query to get the Team member and his role for particular lead owner
* Using data loader extract the same data what you are getting in SOQL Query.
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
I am considering apis for team member fiels is Team_Member__c, for role it is role__c and for object Sales team it is SalesTeam__c
* Write a SOQL Query to get the Team member and his role for particular lead owner
[select Team_Member__c, role__c from SalesTeam__c where Lead__r.ownerid = 'ANY USER ID' ]
* Using data loader extract the same data what you are getting in SOQL Query.
it is a practical part
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
[select Team_Member__c, role__c from SalesTeam__c where Team_Member__c = 'XYZ' AND ID = 'abc']
Thanks
Sandeep Singhal
http://www.codespokes.com/
but m getting this error
sObject type 'SalesTeam__c' is not supported.
when m using this code
select Team_Member__c, role__c from SalesTeam__c where Lead__r.ownerid = 'ANY USER ID
As I have I have mentioned that I have just used some dummy name as you have not provided all apis so you need to get these correct apis from your Salesforce org. go to Setup> Objects and then you can search for your concerned object.
Thanks
Sandeep Singhal
skype: sandeep.singhal
http://www.codespokes.com/
ya sure m work on that plz let me know how u relate Lead and Sales Team
see m created a custom object Sales Team (SalesTeam__c)
then created a lookup relationship field like Role(role__c) and Team Member(SalesTeam__c) with lead
but how we relate
Team Member (Looup to user)
Role-(Lookup to role)
i'm follow ur suggestion ...and create same field
but...
if i gona write only this SOQL code
select Team_Member__c , role__c from SalesTeam__c
it will shows right result but as my case in need a SOQL Query to get the Team member and his role for particular lead owner
as u say if i'm following ur code m getting error
select Team_Member__c, role__c from SalesTeam__c where Lead__r.ownerid = 'ANY USER ID'
error
role__c from SalesTeam__c where Lead__r.ownerid = 'ANY USER ID'
^
ERROR at Row:1:Column:56
Didn't understand relationship 'Lead__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.