Adding an Intercompany Journal Entry
The following example shows how to create an intercompany journal entry record that has four sublist lines.
C#
private void addInterCompanyJournalEntry()
{
InterCompanyJournalEntry newInterCompanyJournalEntry = new InterCompanyJournalEntry();
newInterCompanyJournalEntry.externalId = "11890-A";
RecordRef mySubsidiary = new RecordRef();
mySubsidiary.internalId = "1";
newInterCompanyJournalEntry.subsidiary = mySubsidiary;
RecordRef myToSubsidiary = new RecordRef();
myToSubsidiary.internalId = "10";
newInterCompanyJournalEntry.toSubsidiary = myToSubsidiary;
RecordRef myCurrency = new RecordRef();
myCurrency.internalId = "1";
newInterCompanyJournalEntry.currency = myCurrency;
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";
newInterCompanyJournalEntry.lineList = new InterCompanyJournalEntryLineList();
newInterCompanyJournalEntry.lineList.line = new InterCompanyJournalEntryLine[4];
newInterCompanyJournalEntry.lineList.line[0] = new InterCompanyJournalEntryLine();
newInterCompanyJournalEntry.lineList.line[0].lineSubsidiary = mySubsidiary;
newInterCompanyJournalEntry.lineList.line[0].account = myDebitAccount;
newInterCompanyJournalEntry.lineList.line[0].debit = 920000;
newInterCompanyJournalEntry.lineList.line[0].debitSpecified = true;
newInterCompanyJournalEntry.lineList.line[1] = new InterCompanyJournalEntryLine();
newInterCompanyJournalEntry.lineList.line[1].lineSubsidiary = mySubsidiary;
newInterCompanyJournalEntry.lineList.line[1].account = myCreditAccount;
newInterCompanyJournalEntry.lineList.line[1].credit = 920000;
newInterCompanyJournalEntry.lineList.line[1].creditSpecified = true;
newInterCompanyJournalEntry.lineList.line[2] = new InterCompanyJournalEntryLine();
newInterCompanyJournalEntry.lineList.line[2].lineSubsidiary = myToSubsidiary;
newInterCompanyJournalEntry.lineList.line[2].account = mySecondDebitAccount;
newInterCompanyJournalEntry.lineList.line[2].debit = 920000;
newInterCompanyJournalEntry.lineList.line[2].debitSpecified = true;
newInterCompanyJournalEntry.lineList.line[3] = new InterCompanyJournalEntryLine();
newInterCompanyJournalEntry.lineList.line[3].lineSubsidiary = myToSubsidiary;
newInterCompanyJournalEntry.lineList.line[3].account = mySecondCreditAccount;
newInterCompanyJournalEntry.lineList.line[3].credit = 920000;
newInterCompanyJournalEntry.lineList.line[3].creditSpecified = true;
_service.add(newInterCompanyJournalEntry);
}
SOAP Request
<soap:Body>
<add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<record externalId="11890-A" xsi:type="q1:InterCompanyJournalEntry" xmlns:q1="urn:general_2017_1.transactions.webservices.netsuite.com">
<q1:currency internalId="1"/>
<q1:subsidiary internalId="1"/>
<q1:toSubsidiary internalId="10"/>
<q1:lineList>
<q1:line>
<q1:lineSubsidiary internalId="1"/>
<q1:account internalId="1"/>
<q1:debit>920000</q1:debit>
</q1:line>
<q1:line>
<q1:lineSubsidiary internalId="1"/>
<q1:account internalId="3"/>
<q1:credit>920000</q1:credit>
</q1:line>
<q1:line>
<q1:lineSubsidiary internalId="10"/>
<q1:account internalId="214"/>
<q1:debit>920000</q1:debit>
</q1:line>
<q1:line>
<q1:lineSubsidiary internalId="10"/>
<q1:account internalId="215"/>
<q1:credit>920000</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="11890-A" internalId="522" 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