Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to use simple salesforce (python library for salesforce) to add ShippingAddress field?

Asked by Camellia Kleiber May 9, 2023 953 views 1 answer
Share

About this question

I have tried to upsert an account with Shipping Address using simple salesforce However, I am getting the error:

[{u'errorCode': u'JSON_PARSER_ERROR', u'message': u'Cannot deserialize instance of ShippingAddress from VALUE_STRING value abc or request may be missing a required field at [line:1, column:31]'}]
Below is my query.
    sf.Account.upsert(
        'Custom_Id__c/abc123',
        {
            'Name': 'abc',
            'RecordTypeId': '0121U000000G51AbC',
            'ShippingAddress': {        
                'City': 'abc',
                'Country': 'USA',
                'Street': 'Town Hall',
                'CountryCode': None,
                'PostalCode': None,
                'State': None,
                'StateCode': None,      
                'Accuracy': None,
                'Latitude': None,
                'Longitude': None,                  
            }               
        },

Any idea on how I can upsert shipping addresses properly using simple salesforce?

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.