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

SOql from event to User
HI,
I am trying to write the soql on event to fetch the custom field on USER object its failing. Please advise with some example.
Thanks
I am trying to write the soql on event to fetch the custom field on USER object its failing. Please advise with some example.
Thanks
You cannot query your custom fields on the user object from event directly. You can only query few standard fields on the user object like name, email etc as below query.
However, you can create a custom formula field (Example: New_formulafield__c) on the Activities object with formula value like Owner:User.Custom_field__c. This will now populate your custom formula field value with value in user record. And you can use query like below: Refer to this link:
https://skaruz.com/salesforce-how-to-access-owner-custom-fields-in-a-soql-query/
I was able to fetch the values! Hope this helps, Please mark as best if it solves your problem.
Thanks
All Answers
You cannot query your custom fields on the user object from event directly. You can only query few standard fields on the user object like name, email etc as below query.
However, you can create a custom formula field (Example: New_formulafield__c) on the Activities object with formula value like Owner:User.Custom_field__c. This will now populate your custom formula field value with value in user record. And you can use query like below: Refer to this link:
https://skaruz.com/salesforce-how-to-access-owner-custom-fields-in-a-soql-query/
I was able to fetch the values! Hope this helps, Please mark as best if it solves your problem.
Thanks