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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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