Getting a Global Account Mapping Record

The process of getting a global account mapping record is similar to the process of getting most other records.

However, you may notice one difference related to the custom dimension field. This difference occurs if you configure the custom dimension field to reference a custom record. In these cases, when you get a global account record that uses the custom dimension field, the SOAP response will include a CustomRecordRef, with an “internalId” referencing the custom record’s internal ID, and a “typeId” representing the custom record type’s internal ID. However, be aware that when you add a record, you can set a value for custom dimension using RecordRef, even when the field references a custom record.

The following example illustrates the scenario where custom dimension references a custom record.

C#

          private void getGlobalAccountMapping()
{
   RecordRef recordGlobalAccountMapping = new RecordRef();
   recordGlobalAccountMapping.externalId = "101L";
   recordGlobalAccountMapping.type = RecordType.globalAccountMapping;
   recordGlobalAccountMapping.typeSpecified = true;

   _service.get(recordGlobalAccountMapping);
} 

        

SOAP Request

          <soap:Body>
   <get xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <baseRef type="globalAccountMapping" externalId="101L" xsi:type="q1:RecordRef" xmlns:q1="urn:core_2017_1.platform.webservices.netsuite.com"/>
   </get>
</soap:Body> 

        

SOAP Response

          <soapenv:Body>
   <getResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <readResponse>
         <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
            <record xsi:type="listAcct:GlobalAccountMapping" externalId="101L" internalId="901" xmlns:listAcct="urn:accounting_2017_1.lists.webservices.netsuite.com">
               <listAcct:customForm internalId="-720" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                  <platformCore:name>Standard Global Account Mapping Form</platformCore:name>
               </listAcct:customForm>
               <listAcct:effectiveDate>2013-01-28T00:00:00.000-08:00</listAcct:effectiveDate>
               <listAcct:accountingBook internalId="8" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                  <platformCore:name>CAD Book all sub</platformCore:name>
               </listAcct:accountingBook>
               <listAcct:subsidiary internalId="2" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                  <platformCore:name>CAN Subsid</platformCore:name>
               </listAcct:subsidiary>
               <listAcct:sourceAccount internalId="183" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                  <platformCore:name>VAT on Sales</platformCore:name>
               </listAcct:sourceAccount>
               <listAcct:destinationAccount internalId="195" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                   <platformCore:name>VAT on Sales DE</platformCore:name>
               </listAcct:destinationAccount>
               <listAcct:customDimension xsi:type="platformCore:CustomRecordRef" typeId="1" internalId="2" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                  <platformCore:name>Phase</platformCore:name>
               </listAcct:customDimension>
            </record>
         </readResponse>
   </getResponse>
</soapenv:Body> 

        

When adding this same record, you could do so using the following code snippet to identify the custom record:

          RecordRef customRecord = new RecordRef();
customRecord.type = RecordType.customRecord;
customRecord.internalId = "2";
newGlobalAccountMapping.customDimension = customRecord; 

        

Related Topics

General Notices