You need to sign in to do that
Don't have an account?

how to get the user details from lead object
Hi ,
How to get the user field details from the lead object .
Thanks
lokesh
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi ,
How to get the user field details from the lead object .
Thanks
lokesh
Please use the created By field on the lead object to get the User details.
Please mark this as the best answer if you liked it.
Thanks,
Rohit Alladi
There are various standard user fields on the Lead object.
CreatedBy
LastModifiedBy
OwnerId
You can query these fields for the user details you can access all fields of the user object if you have necessary permissions.
Thanks
Anupama
If i use created By field then if the lead owner changes then the lead owner will be different and created by id is different.I need to get the custom field on the user object depending upon the lead owner and use in condition.
thanks
lokesh
Sure , we can also do it a way where you could get the fields from the Lead Owner Field (Owner.Id , Owner.Name) etc..
Try this out.
Please select this as the best answer if you like it.
Thanks,
Rohit Alladi
I am trying to use the below query but not sure why iam getting the error:
select id,name,owner.Designation__c from lead
Error:
No such column 'Designation__c' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names
Yes , in that case we need to use the Left Inner Join Query as below ,
SELECT Name,Designation__c from User where id IN (Select ownerId from Lead) .
Please select this as the best answer if you like it.
Thanks,
Rohit Alladi