2017-09-26 13 views
0

NetSuite WSDLで作業しています。私は過去2日間このエラーに立ち往生しています。私はインターネットで検索しましたが、解決策を見つけることができませんでした。NetSuiteエラー:CustomFieldRefは抽象型であり、インスタンス化できません。

は、私は、Pythonを使ってネットスイートでcustom fieldを追加しようが、私は助けの任意の種類をappretiatedされるだろう

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

エラーを取得しています。前もって感謝します。

答えて

0

にタイプのリストを取得することができます私の代わりにCustomFieldRefのSelectCustomFieldRefを使用して、質問を解決しました。すなわち

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) 
1

エラーはほとんど分かりませんが、理解していなければ役に立ちません。

カスタムフィールドを編集/作成する場合は、正しいタイプをインスタンス化する必要があります。

Javaの

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

にあなたはNetsuite docs

+0

サンプルコードをPythonで与えることができれば助かります。 –

+0

それは私には分かりません。基本的なコンセプトは、具体的な型を作成する必要があるということです。それが私のものなので、Javaが提供されました。 – bknights

+0

サンドボックスNetSuiteのリンクを提供できますか? –

関連する問題