If you want only the internalIds, externalIds, and/or scriptIds for custom objects of a specific type, you can call getCustomizationId on that custom type (for example, crmCustomField). However, if you also want the metadata for any or all of the custom objects referenced in the getCustomizationId response, you must invoke a get or getList request and specify each object’s ID.
When using either the get or getList operations in conjunction with getCustomizationId, be aware of the following:
•
If you specify more than one ID in a get | getList call, the IDs you pass are read in the following order: internalId, externalId, scriptId.•
If an invalid scriptId is specified but the internalId or externalId is correct, the scriptId is ignored.•
NetSuite will reject get | getList requests if only a scriptId is passed for record types that do not support scriptIds.Request
The getCustomizationIdRequest type is used for this request. It contains the following fields:
Response
The getCustomizationIdResult type is used for the response. It contains the following fields:
Faults
This operation can throw one of the following faults. See SOAP Fault Status Codes for more information on faults.
•
InvalidSessionFaultElement Name XSD Type Notes
customizationType CustomizationType Any of the custom object types enumerated in CustomizationType.
includeInactives boolean A value of true or false is required. A value of false means no inactive custom objects are returned in the response. A value of true means that both active and inactive custom objects are returned in the response.
Important:
•
To determine which of the returned custom objects are inactive, you must perform either a get or getList operation to obtain the metadata for the custom object type(s). For custom records and custom lists, the value is specified in the isInactive element.•
Although the includeInactives argument is required,the value you set applies to custom record and custom list objects only. In NetSuite, custom fields cannot be set to active or inactive. Therefore, when using getCustomizationId on a custom field type, the value you specify for includeInactives will be ignored. Whether you specify true or false, all custom field objects (of the type specified in your request) will be returned.
Element Name XSD Type Notes
status Status The status for this operation. All applicable errors or warnings are listed within this type.
totalRecords xsd:int The total number of records for this request. Depending on the pageSize value, some or all the records may be returned in the response.
customizationRefList CustomizationRef A list of custom objects that correspond to the specified customization type. Also returns the internalId, externalId, and/or scriptId of each object.
•
InvalidCredentialsFault•
ExceededRequestLimitFault•
ExceededUsageLimitFault•
ExceededRecordCountFault•
ExceededRequestSizeFault•
UnexpectedErrorFaultSample Code
The following sample is a two-part sample. The first part of the sample shows how to construct a getCustomizationId request so that the IDs for all custom record type objects in a NetSuite account are returned. Notice that in the getCustomizationId request, the value of the
includeInactives parameter is set to false, meaning that only custom records marked as “active” in the account will be returned.
The second part of the sample shows how to take internalIds that are returned, and make a getList request to return the metadata for each custom record type.
C# Sample
NetSuiteService nss = new NetSuiteService(); // credential code ignored here in this sample ... // Perform getCustomizationId on custom record type CustomizationType ct = new CustomizationType(); ct.getCustomizationTypeSpecified=true;
ct.getCustomizationType = GetCustomizationType.customRecordType;
// Retrieve active custom record type IDs. The includeInactives param is set to false. GetCustomizationIdResult getCustIdResult = nss.getCustomizationId(ct, false); // Retrieve the metadata of the returned custom record types
ReadResponse [] readResp = nss.getList(getCustIdResult.customizationRefList);
SOAP Request (getCustomizationId)
<getCustomizationId xmlns="urn:messages_2010_1.platform.webservices.netsuite.com"> <customizationType getCustomizationType="customRecordType" />
<includeInactives>false</includeInactives> </getCustomizationId>
SOAP Request (getList)
<getList xmlns="urn:messages_2010_1.platform.webservices.netsuite.com"> <baseRef xmlns:q1="urn:core_2010_1.platform.webservices.netsuite.com"
xsi:type="q1:CustomizationRef " internalId="15" scriptId="customrecord15" type="customRecordType">
<q1:name>Customer Satisfaction Survey</q1:name> </baseRef>
SOAP Response (getCustomizationId) <getCustomizationIdResponse xmlns="urn:messages_2010_1.platform.webservices.netsuite.com"> <platformCore:getCustomizationIdResult xmlns:platformCore="urn:core_2010_1.platform.webservices.netsuite.com"> <platformCore:status isSuccess="true"/> <platformCore:totalRecords>1</platformCore:totalRecords> <platformCore:customizationRefList>
<platformCore:customizationRef internalId="15" scriptId="customrecord15" type="customRecordType">
<platformCore:name>Customer Satisfaction Survey</platformCore:name> </platformCore:customizationRef>
</platformCore:customizationRefList> </platformCore:getCustomizationIdResult> </getCustomizationIdResponse>
SOAP Response (getList)
<getListResponse xmlns="urn:messages_2010_1.platform.webservices.netsuite.com"> <readResponseList>
<readResponse>
<platformCore:status isSuccess="true"
xmlns:platformCore="urn:core_2010_1.platform.webservices.netsuite.com"/> <record internalId="15" xsi:type="setupCustom:CustomRecordType"
xmlns:setupCustom="urn:customization_2010_1.setup.webservices.netsuite.com"> <setupCustom:recordName>Customer Satisfaction Survey</setupCustom:recordName> <setupCustom:includeName>true</setupCustom:includeName> <setupCustom:showId>true</setupCustom:showId> <setupCustom:showCreationDate>true</setupCustom:showCreationDate> <setupCustom:showCreationDateOnList>true</setupCustom:showCreationDateOnList> <setupCustom:showLastModified>true</setupCustom:showLastModified> <setupCustom:showLastModifiedOnList>true</setupCustom:showLastModifiedOnList> <setupCustom:showOwner>false</setupCustom:showOwner> <setupCustom:showOwnerOnList>false</setupCustom:showOwnerOnList> <setupCustom:showOwnerAllowChange>false</setupCustom:showOwnerAllowChange> <setupCustom:usePermissions>false</setupCustom:usePermissions> <setupCustom:allowAttachments>false</setupCustom:allowAttachments> <setupCustom:showNotes>true</setupCustom:showNotes> <setupCustom:enableMailMerge>false</setupCustom:enableMailMerge> <setupCustom:isOrdered>false</setupCustom:isOrdered> <setupCustom:allowInlineEditing>false</setupCustom:allowInlineEditing> <setupCustom:isAvailableOffline>false</setupCustom:isAvailableOffline> <setupCustom:allowQuickSearch>false</setupCustom:allowQuickSearch> <setupCustom:isInactive>false</setupCustom:isInactive>
<setupCustom:disclaimer><b>Record numbers cannot be reverted back to names once updated.<br/></setupCustom:disclaimer> <setupCustom:enableNumbering>false</setupCustom:enableNumbering> <setupCustom:numberingCurrentNumber>413</setupCustom:numberingCurrentNumber> <setupCustom:allowNumberingOverride>false</setupCustom:allowNumberingOverride> <setupCustom:isNumberingUpdateable>false</setupCustom:isNumberingUpdateable> <setupCustom:scriptId>customrecord15</setupCustom:scriptId> <setupCustom:fieldList> <setupCustom:customField internalId="CUSTRECORD_CONTACT_TYPE"> <setupCustom:label>Contact type</setupCustom:label> <setupCustom:fieldType>_listRecord</setupCustom:fieldType> <setupCustom:selectRecordType internalId="16" xmlns:platformCore="urn:core_2010_1.platform.webservices.netsuite.com">
<platformCore:name>Customer contact type</platformCore:name> </setupCustom:selectRecordType> <setupCustom:storeValue>true</setupCustom:storeValue> <setupCustom:showInList>false</setupCustom:showInList> <setupCustom:globalSearch>false</setupCustom:globalSearch> <setupCustom:isParent>false</setupCustom:isParent> <setupCustom:displayType>_normal</setupCustom:displayType> <setupCustom:isMandatory>true</setupCustom:isMandatory> <setupCustom:checkSpelling>false</setupCustom:checkSpelling> <setupCustom:defaultChecked>false</setupCustom:defaultChecked> <setupCustom:isFormula>false</setupCustom:isFormula> <setupCustom:recType>15</setupCustom:recType> <setupCustom:roleRestrict>false</setupCustom:roleRestrict> <setupCustom:accessLevel>_edit</setupCustom:accessLevel> <setupCustom:searchLevel>_edit</setupCustom:searchLevel> </setupCustom:customField> <setupCustom:customField internalId="CUSTRECORD_IF_OTHER"> <setupCustom:label>Other contact type</setupCustom:label> <setupCustom:fieldType>_freeFormText</setupCustom:fieldType> <setupCustom:storeValue>true</setupCustom:storeValue> <setupCustom:showInList>false</setupCustom:showInList> <setupCustom:globalSearch>false</setupCustom:globalSearch> <setupCustom:isParent>false</setupCustom:isParent> <setupCustom:displayType>_normal</setupCustom:displayType> <setupCustom:displayWidth>42</setupCustom:displayWidth> <setupCustom:isMandatory>false</setupCustom:isMandatory> <setupCustom:checkSpelling>false</setupCustom:checkSpelling> <setupCustom:defaultChecked>false</setupCustom:defaultChecked> <setupCustom:isFormula>false</setupCustom:isFormula> <setupCustom:recType>15</setupCustom:recType> <setupCustom:roleRestrict>false</setupCustom:roleRestrict> <setupCustom:accessLevel>_edit</setupCustom:accessLevel> <setupCustom:searchLevel>_edit</setupCustom:searchLevel> </setupCustom:customField>
// custom field list continues ... </setupCustom:fieldList>
<setupCustom:formsList> <setupCustom:forms>
<setupCustom:formName>Standard Customer Satisfaction Survey Form<setupCustom:formName> <setupCustom:formPref>false</setupCustom:formPref> </setupCustom:forms> </setupCustom:formsList> <setupCustom:parentsList> <setupCustom:parents> <setupCustom:childDescr>Customer</setupCustom:childDescr> </setupCustom:parents> </setupCustom:parentsList> </record> </readResponse> </readResponseList> </getListResponse>
getDataCenterUrls
The getDataCenterUrls operation supports dynamic discovery of the correct URLs for external client access to NetSuite. This discovery is required because NetSuite began hosting new customer accounts in multiple data centers as of September, 2012. Each data center has a different domain, so the domain to be used for external client access depends upon the data center hosting each NetSuite account.
This operation supports discovery of the following domains:
•
restDomain - https://rest.netsuite.com or https://rest.na1.netsuite.com (used for RESTlet access)•
systemDomain - https://system.netsuite.com or https://system.na1.netsuite.com•
webservicesDomain - https://webservices.netsuite.com orhttps://webservices.na1.netsuite.com
If you are building an integration for a single customer, you can use this operation to determine the correct URL for that particular customer. If you are building a partner application, you need to incorporate this operation into your application logic so that can dynamically determine the correct URL for NetSuite access across multiple NetSuite customers.