function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aleksandra CzepiergaAleksandra Czepierga 

Get account owner with pyton simple salesforce

Hi! Is is possible to get account owner with simple salesforce?

What I am trying:
def get_owner(par):
    data = sf.query(format_soql("SELECT AccountId FROM Contact WHERE AccountId = {}", par))
    print(data)

But result of get_owner('0013c00001pb0BAAAY')  is

OrderedDict([('totalSize', 2), ('done', True), ('records', [OrderedDict([('attributes', OrderedDict([('type', 'Contact'), ('url', '/services/data/v42.0/sobjects/Contact/0033c00002UZTOWAA5')])), ('AccountId', '0013c00001pb0BAAAY')]), OrderedDict([('attributes', OrderedDict([('type', 'Contact'), ('url', '/services/data/v42.0/sobjects/Contact/0033c00002Uatx1AAB')])), ('AccountId', '0013c00001pb0BAAAY')])])])

How to get only id or name?!
AbhishekAbhishek (Salesforce Developers) 
Hi,

The below video blog will guide you on how to get account owner,

https://www.youtube.com/watch?v=_FHD3pjKrbY

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.