Adding a Book Specific Intercompany Journal Entry

The following example shows how to create a book specific intercompany journal entry record that has four sublist lines.

C#

          private void addBookSpecificInterCompanyJournalEntry()
{

   InterCompanyJournalEntry newBookSpecificInterCompanyJournalEntry = new InterCompanyJournalEntry();
   newBookSpecificInterCompanyJournalEntry.externalId = "11895-A";

   RecordRef mySubsidiary = new RecordRef();
   mySubsidiary.internalId = "1";
   newBookSpecificInterCompanyJournalEntry.subsidiary = mySubsidiary;

   RecordRef myToSubsidiary = new RecordRef();
   myToSubsidiary.internalId = "10";
   newBookSpecificInterCompanyJournalEntry.toSubsidiary = myToSubsidiary;

   RecordRef myAccountingBook = new RecordRef();
   myAccountingBook.internalId = "2";
   newBookSpecificInterCompanyJournalEntry.accountingBook = myAccountingBook;

   RecordRef myDebitAccount = new RecordRef();
   myDebitAccount.internalId = "1";

   RecordRef myCreditAccount = new RecordRef();
   myCreditAccount.internalId = "3";

   RecordRef mySecondDebitAccount = new RecordRef();
   mySecondDebitAccount.internalId = "214";

   RecordRef mySecondCreditAccount = new RecordRef();
   mySecondCreditAccount.internalId = "215";

   newBookSpecificInterCompanyJournalEntry.lineList = new InterCompanyJournalEntryLineList();
   newBookSpecificInterCompanyJournalEntry.lineList.line = new InterCompanyJournalEntryLine[4];

   newBookSpecificInterCompanyJournalEntry.lineList.line[0] = new InterCompanyJournalEntryLine();
   newBookSpecificInterCompanyJournalEntry.lineList.line[0].lineSubsidiary = mySubsidiary;
   newBookSpecificInterCompanyJournalEntry.lineList.line[0].account = myDebitAccount;
   newBookSpecificInterCompanyJournalEntry.lineList.line[0].debit = 45000;
   newBookSpecificInterCompanyJournalEntry.lineList.line[0].debitSpecified = true;

   newBookSpecificInterCompanyJournalEntry.lineList.line[1] = new InterCompanyJournalEntryLine();
   newBookSpecificInterCompanyJournalEntry.lineList.line[1].lineSubsidiary = mySubsidiary;
   newBookSpecificInterCompanyJournalEntry.lineList.line[1].account = myCreditAccount;
   newBookSpecificInterCompanyJournalEntry.lineList.line[1].credit = 45000;
   newBookSpecificInterCompanyJournalEntry.lineList.line[1].creditSpecified = true;

   newBookSpecificInterCompanyJournalEntry.lineList.line[2] = new InterCompanyJournalEntryLine();
   newBookSpecificInterCompanyJournalEntry.lineList.line[2].lineSubsidiary = myToSubsidiary;
   newBookSpecificInterCompanyJournalEntry.lineList.line[2].account = mySecondDebitAccount;
   newBookSpecificInterCompanyJournalEntry.lineList.line[2].debit = 45000;
   newBookSpecificInterCompanyJournalEntry.lineList.line[2].debitSpecified = true;

 newBookSpecificInterCompanyJournalEntry.lineList.line[3] = new InterCompanyJournalEntryLine();
   newBookSpecificInterCompanyJournalEntry.lineList.line[3].lineSubsidiary = myToSubsidiary;
   newBookSpecificInterCompanyJournalEntry.lineList.line[3].account = mySecondCreditAccount;
   newBookSpecificInterCompanyJournalEntry.lineList.line[3].credit = 45000;
   newBookSpecificInterCompanyJournalEntry.lineList.line[3].creditSpecified = true;

   _service.add(newBookSpecificInterCompanyJournalEntry);

} 

        

SOAP Request

          <soap:Body>
   <add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <record externalId="11895-A" xsi:type="q1:InterCompanyJournalEntry" xmlns:q1="urn:general_2017_1.transactions.webservices.netsuite.com">
         <q1:accountingBook internalId="2"/>
         <q1:subsidiary internalId="1"/>
         <q1:toSubsidiary internalId="10"/>
         <q1:lineList>
            <q1:line>
               <q1:lineSubsidiary internalId="1"/>
               <q1:account internalId="1"/>
               <q1:debit>45000</q1:debit>
            <q1:line>
            <q1:line>
               <q1:lineSubsidiary internalId="1"/>
               <q1:account internalId="3"/>
               <q1:credit>45000</q1:credit>
            </q1:line>
            <q1:line>
               <q1:lineSubsidiary internalId="10"/>
               <q1:account internalId="214"/>
               <q1:debit>45000</q1:debit>
            </q1:line>
            <q1:line>
               <q1:lineSubsidiary internalId="10"/>
               <q1:account internalId="215"/>
               <q1:credit>45000</q1:credit>
            </q1:line>
         </q1:lineList>
      </record>
   </add>
</soap:Body> 

        

SOAP Response

          <soapenv:Body>
   <addResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <writeResponse>
         <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
         <baseRef xsi:type="platformCore:RecordRef" type="interCompanyJournalEntry" externalId="11895-A" internalId="621" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
      </writeResponse>
   </addResponse>
</soapenv:Body> 

        

Related Topics

Intercompany Journal Entry
Intercompany Journal Entry Supported Operations
Intercompany Journal Entry Body and Sublist Fields
Intercompany Journal Entry Code Samples
Common Errors With Intercompany Journal Entries
Transactions
Usage Notes for Transaction Record Types
Transaction Search
Multiple Shipping Routes in SOAP Web Services
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices