Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Salesforce by (11.9k points)

I have been trying to update a nested object using simple_salesforce specifically been trying to update the Owner field in a Case object.

from simple_salesforce import Salesforce

sf = Salesforce(username = 'username',password = 'password',security_token='security_token', sandbox = False)

sf.Case.create({'Description':'stuff in description','Owner':'Owners User'})

Whenever I try to insert I get the following error:

Response content:

[{u'errorCode': u'INVALID_FIELD', u'message': u'The value provided for foreign key reference Owner is not a nested SObject'}]

Please, any help would be appreciated.

1 Answer

0 votes
by (32.1k points)
edited by
To solve this query you'll have to use the OwnerId field and pass the ID of the owner.
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories