Application ID Code Samples (Request-Level Credentials)

The following procedure shows one way of updating an application to include an application ID, which is a field in the ApplicationInfo complex type. In the following C# code snippets, application ID is added to an integration’s request-level credentials.

For Java code samples, download the Java sample applications from the SuiteTalk Sample Applications site.

The ApplicationInfo complex type is defined in the Messages XSD.

To add an application ID to an integration:

  1. Create an ApplicationInfo class member. For example:

                    namespace NetSuite
    class SOAPApplication
          public NetSuiteService _service;            
          private Preferences _prefs;      
          private SearchPreferences _searchPreferences;
          private ApplicationInfo _appInfo; 
  2. Create an instance of ApplicationInfo. Set the applicationId value to the actual application ID of the relevant integration record.

                    private void setApplicationInfo()
          _appInfo = new ApplicationInfo();
          _service.applicationInfo = _appInfo;
          _appInfo.applicationId = "C4A2541D-16FB-4845-B8A2-8B8A34BDBB61";
  3. Use your instance of ApplicationInfo to modify the SOAP header that will be generated.

                    public SuiteTalkCourse()
       ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
       _service = new DataCenterAwareNetSuiteService();

    The next time the application sends a request, the application ID is included in the header.

       <applicationInfo xmlns="">
       <passport xmlns="">
          <email xmlns=""></email>
          <password xmlns="">**********</password>
          <account xmlns="">1013519</account>
          <role internalId="3" xmlns=""/>
       <preferences xmlns=""/>

Related Topics

Requirements for Using an Application ID and User Credentials
Sending an Application ID with User Credentials
Using Application ID with the Login and ssoLogin Operations
Application IDs

General Notices