We are having a problem with the search of a custom record through the suite, below what we are calling a The sample is there. The issue we are raising is trying to establish a search using the internal ID of the record. This issue is in our initial development account, the internal ID of this custom record is 482, but when we deployed it through our bundle, the record was assigned with the internal ID of the 314. This will stand for the reason that this is not an internal ID, a site is fixed on the installation site, so we thought which asset would be set up to refer to custom records. When we make records, we have assigned our "script ID" to 'custom-made_memory custom record', but through the suttech we do not have "script-bound", this code for us is the best way to work in all the environments. Is not there any specific? And if so, can you give an example of how it can be used.
Code (C #), which we are trying to call, we are currently using 2013.2 endpoints.
Private Search Search NetSwita_GetPackage Consultant Customord (String S Parenter) {List & lt; Object & gt; PackageSearchResults = New list & lt; Object & gt; (); CustomRecordCustomer = new customizer (); Custom Guard Search Search Custom Record Search = New Custom Guard Search (); SearchMultiSelectCustomField SearchFilter 1 = New SearchMultiCustomField (); SearchFilter1.internalId = "customrecord_myCustomRecord_sublist"; SearchFilter1. @ Operator = SearchMultiSelectFieldOperator.anyOf; SearchFilter1.operator specified = true; ListAurcordRF lRecordRef = new list authoracord (); LRecordRef.internalId = sParentRef; SearchFilter1.searchValue = new listorder [] {lRecordRef}; CustomRecordCustomCustomCustomCardBasic = new customcutshipsBasic (); CustomRecordBasic.recType = new RecordRef (); CustomRecordBasic.recType.internalId = "314"; // "482"; // This line is trusting us http://customRecordBasic.recType.name = "customrecord_myCustomRecord"; CustomRecordBasic.customFieldList = New Search CustomField [] {searchFilter1}; CustomRecordSearch.basic = customRecordBasic; // Search for Customer Entity SearchResult Results = _service.search (customRecordSearch); Return results; }
I searched everything for a solution to avoid hardcoding. Until that NetSuite support failed to give me a solution. Finally, I stumbled upon a solution in the knowledgebase of NetSwight, getCustomizationId .
This is for all customcards (or customcards type in the NetSuite words to find the internal ID, script ID and name!)
public string GetCustomizationId (string Script IDM) {// Custom record type CustomizationType CT = getCustomizationId display on new customization type (); Ct.getCustomizationTypeSpecified = True; Ct.getCustomizationType = GetCustomizationType.customRecordType; // Recover active custom record type ID includedInniteVative is set to the ultimate bogus GetCustomizationIdResult getCustIdResult = _service.getCustomizationId (whistle, wrong); Forex Currency (Miscellaneous OptimizationIf you getCustIdResult.customizationRefList) {if (customizationRef.scriptId == scriptId) back optimization rif internalId; } Return tap; }
Comments
Post a Comment