AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



web-service-netsuite: How can we use script Id in custom search basic?

How can use script Id in Following code to get an out put example given below.

SearchBooleanCustomField searchFilterTodayInvoice = new SearchBooleanCustomField();
//searchFilterTodayInvoice.internalId = "2605";
searchFilterTodayInvoice.scriptId = "custrecord_pos_invoice_today";
searchFilterTodayInvoice.searchValue = true;
searchFilterTodayInvoice.searchValueSpecified = true;

SearchBooleanCustomField searchFilterPaymentNotReceived = new SearchBooleanCustomField();
//searchFilterPaymentNotReceived.internalId = "2514";
searchFilterPaymentNotReceived.scriptId = "custrecord_pos_invoice_payment_received";
searchFilterPaymentNotReceived.searchValue = false;
searchFilterPaymentNotReceived.searchValueSpecified = true;

//SearchMultiSelectCustomField Search_Location_Id = new SearchMultiSelectCustomField();
//Search_Location_Id.scriptId = "custrecord_pos_invoice_location";
//Search_Location_Id.internalId = "2507";
//Search_Location_Id.operatorSpecified = true;
//Search_Location_Id.@operator = SearchMultiSelectFieldOperator.anyOf;

//ListOrRecordRef List_Pos_Location = new ListOrRecordRef();
//List_Pos_Location.internalId = Location_Id_Label.Text;
//Search_Location_Id.searchValue = new ListOrRecordRef[] { List_Pos_Location };


CustomRecordSearchBasic CRSB = new CustomRecordSearchBasic();
CRSB.isInactive = new SearchBooleanField();
CRSB.isInactive.searchValue = false;
CRSB.isInactive.searchValueSpecified = true;
CRSB.recType = new RecordRef();
CRSB.recType.internalId = "316";
CRSB.recType.name = "customrecord_pos_invoice";
CRSB.customFieldList = new SearchCustomField[] { searchFilterTodayInvoice, searchFilterPaymentNotReceived };
SearchResult res = _service.search(CRSB);
res.pageSize = 500;
res.pageSizeSpecified = true;
var C = 0;
Record[] searchRecords = res.recordList;
if (searchRecords != null && searchRecords.Length >= 1)
{
List<CustomRecord> Modifiers_CustomRecord = searchRecords.Select(t => (CustomRecord)t).ToList();
POS_Invoice = new string[searchRecords.Length];
POS_Invoice_Id = new string[searchRecords.Length];
foreach (CustomRecord t in Modifiers_CustomRecord)
{
POS_Invoice[C] = t.customRecordId;
POS_Invoice_Id[C] = t.internalId;
C++;
}
}

int ID;
List<System.Web.UI.WebControls.ListItem> items = new List<System.Web.UI.WebControls.ListItem>();
items.Add(new System.Web.UI.WebControls.ListItem("Please Select", "0"));
for (ID = 0; POS_Invoice != null && ID < POS_Invoice.Length; ID++)
{
items.Add(new System.Web.UI.WebControls.ListItem(POS_Invoice[ID], POS_Invoice_Id[ID]));
}
ddlStandByInvoiceId.Items.AddRange(items.ToArray());


In above example there is one line like CRSB.recType.internalId = "316";
but instead 316 ID I want script ID. Is it possible or not?

web-service x 19
netsuite x 18
Posted On : 2015-04-06 10:49:29.0
profile Amol Ghadage - anyforum.in Amol Ghadage
2900
up-rate
-2
down-rate

Answers


Note:
---------------------
Using a user-defined scriptId to reference custom records and lists, saved searches, and scripts is not currently supported.

Posted On : 2015-04-07 01:26:48
Satisfied : 1 Yes  0 No
profile Rishi Kumar - anyforum.in Rishi Kumar
523188250050
Reply This Thread
up-rate
3
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in