I am using python soap web service to create a new...
# suitetalkapi
s
I am using python soap web service to create a new classification record and getting this error
Copy code
body': {
        'writeResponse': {
            'status': {
                'statusDetail': [
                    {
                        'code': 'USER_ERROR',
                        'message': 'Please enter value(s) for: State, Product Type',
                        'afterSubmitFailed': None,
                        'type': 'ERROR'
                    }
Here is the classification record - I have the state and product type, but not sure what is missing and is this the right way.
Copy code
'nullFieldList': None,
    'name': 'sree-202210051',
    'includeChildren': None,
    'parent': None,
    'isInactive': False,
    'classTranslationList': None,
    'subsidiaryList': None,
    'customFieldList': None,
    'internalId': None,
    'externalId': 'sree-202210051',
    'fullname': 'sree-202210051',
    'State': 'fl',
    'Product Type': 'sell &stay',
    'custrecordstate': {
        'name': 'fl',
        'internalId': '1',
        'externalId': None,
        'type': 'state'
    },
    'custrecord169': {
        'name': 'Sell & Stay',
        'internalId': '1',
        'externalId': None,
        'type': 'product'
    },
    'subsidiary': {
        'name': 'EasyKnock, Inc.',
        'internalId': '1',
        'externalId': None,
        'type': 'subsidiary'
    }
}
b
doesnt look right, custom fields go in the custom field list
do a get on an existing class so you can see how it should llook
s
@battk - when I do a get on existing class, this is what I get - custrecord169 custrecord170 custrecord171 custrecord_cps_bdc_lastupdatedbyimp_cls custrecordstate fullname id includechildren isinactive lastmodifieddate name subsidiary externalid 1. custrecord169 - has the product type value 2. custrecordstate - has the state value
but when I have to do upsert, how do I pass the state and product type.
sorry - I am not sure where to find the correct documentation
b
i dont know what you are using to generate your soap client, so i dont know if thats a sane representation
you can use the SOAP Web Services Usage Log to see the underlying xml to understand why your representations dont make sense
s
@battk - i am using python zeep client
b
do a get for an existing class
then use print on it
you should be able to see what the record should look like
importantly, you should also be able to see the hierarchy of the fields
your custom fields wont be in the same place as the native fields
s
I figured out the issue and was able to resolved it. for some custom fields, we need to instantiate the abstract class . in my case SelectCustomFieldRef().