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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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