You need to sign in to do that
Don't have an account?
Jonathan Osgood 3
SOQL query on User Object
Hi,
I am unable to access certain owner fields on the user object. I'm trying to reach the standard AccountID field and a custom field with no luck. I can reach Owner.name without a problem though.
This works:
SELECT ID, owner.Name FROM Publication__c
and this works:
SELECT ID, owner.email FROM Publication__c
BUT this will NOT work:
SELECT ID, owner.AccountID FROM Publication__c
Is this a known limitation?
I am unable to access certain owner fields on the user object. I'm trying to reach the standard AccountID field and a custom field with no luck. I can reach Owner.name without a problem though.
This works:
SELECT ID, owner.Name FROM Publication__c
and this works:
SELECT ID, owner.email FROM Publication__c
BUT this will NOT work:
SELECT ID, owner.AccountID FROM Publication__c
Is this a known limitation?
Is their any relation b/w Account And Publication__c
what is relation and which is parent and what is child .
I will give a solution for you if you clarify above relation
Regards ,
Harish.R
Yes, there is a look up on Publication__c (child) to Account (parent). I have a trigger that will populate the Account lookup on publication__c when a publication record is updated. The Account ID is on the User record who is updating the publication.
SELECT ID, Account.owner.id FROM Publication__c.
Check this one
Regards,
harish.r
This does not work because the look up field will not be populated yet. This is the field the trigger is going to populate with the User Account ID.
The query needs to be something like SELECT ID, owner.AccountID FROM Publication__c but that doesnt not work. There may be limitations as to what fields you can access on the User object.
Is their any relation b/w user and account . We can Query data crom chaid to parent filed .
Regards ,
Harish.R.