SOQL query to fetch Skills assigned to Users - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
ullas ssullas ss 

SOQL query to fetch Skills assigned to Users

Hi Guys,

Is there way to fetch Chat skills assigned to users in Salesforce, I tried with below queries its not working,
Select Skill from User where id='%%%'
 
Best Answer chosen by ullas ss
Ankush AgarwalAnkush Agarwal
Hi Ullas,

You need to query on SkillUser. It is a join object between Skill and User object:

Select SkillId, UserId from SkillUser where UserId = '%%%'

Please refer below article for SkillUser Object:

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_skilluser.htm

All Answers

Ankush AgarwalAnkush Agarwal
Hi Ullas,

You need to query on SkillUser. It is a join object between Skill and User object:

Select SkillId, UserId from SkillUser where UserId = '%%%'

Please refer below article for SkillUser Object:

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_skilluser.htm
This was selected as the best answer
ullas ssullas ss
Hi Ankush,
Thank you very much, it worked :)