Python NetSuite错误:CustomFieldRef是抽象类型,无法实例化

Python NetSuite错误:CustomFieldRef是抽象类型,无法实例化,python,wsdl,netsuite,Python,Wsdl,Netsuite,我正在研究NetSuite WSDL。过去两天我一直在犯这个错误。我在互联网上搜索过,但找不到解决方案 我试图使用Python在NetSuite中添加一个,但我得到了一个错误 zeep.exceptions.Fault: org.xml.sax.SAXException: {urn:core_2017_1.platform.webservices.netsuite.com}CustomFieldRef is an abstract type and cannot be instantiated

我正在研究NetSuite WSDL。过去两天我一直在犯这个错误。我在互联网上搜索过,但找不到解决方案

我试图使用Python在NetSuite中添加一个,但我得到了一个错误

zeep.exceptions.Fault: org.xml.sax.SAXException: {urn:core_2017_1.platform.webservices.netsuite.com}CustomFieldRef is an abstract type and cannot be instantiated

我们欢迎任何形式的帮助。提前感谢。

除非您已经理解,否则该错误几乎是不言自明的,尽管没有帮助

如果要编辑/创建自定义字段,必须实例化正确的类型

e、 g.在爪哇

StringCustomFieldRef strCF = new StringCustomFieldRef();
strCF.setInternalId(cfNSKey);

您可以在

中获得类型列表。我使用而不是CustomFieldRef解决了这个问题。i、 e

new_record['companyName']= 'test_clinic1'
new_record['firstName']= 'test_clinic_first_name1'
new_record['altName']= 'test_clinic1'
new_record['lastName']='test_last__clinic_name2'
record = RecordRef(internalId=1, type='subsidiary')
new_record['subsidiary'] = record

customField= SelectCustomFieldRef()
customField.internalId='285'
customField.scriptId='custentity_profile_type'
customField.value={
                'name': 'Clinic',
                'internalId': '2',
                'externalId': None,
                'typeId': '31'
            }

new_record['customFieldList']=CustomFieldList(customField)

如果你能用python给出一个示例代码,那会很有帮助,但我不知道。基本概念是您需要创建一个具体类型。提供Java是因为这就是我所拥有的。你能提供沙盒NetSuite的链接吗?你的解释和错误本身一样简短,并且该链接需要登录。你能提供相关信息的摘要吗?我不能。如果您没有Netsuite登录,则信息受NDA/许可协议等的保护。尽管我的回答与OP的自我回答完全相同,即使用与您尝试访问的字段类型相对应的具体类型。