Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Netsuite namespace conflict
I want to post a journal entry to Netsuite from my Python script. I am using zeep to talk to SuiteTalk.
I am new to Netsuite and I am new to SOAP. Following on internet examples, I managed to add a test customer via Python script using the below code:
def make_app_info(client): AppInfo = client.get_type('ns4:ApplicationInfo') app_info = AppInfo(applicationId=NS_APPID) return app_info def make_passport(client): RecordRef = client.get_type('ns0:RecordRef') Passport = client.get_type('ns0:Passport') role = RecordRef(internalId=NS_ROLE) return Passport(email=NS_EMAIL, password=NS_PASSWORD, account=NS_ACCOUNT, role=role) def login_client(): client = Client(WSDL_URL) login = client.service.login(passport=make_passport(client ), _soapheaders={'applicationInfo': make_app_info(client)}) return client 0