@hitc/netsuite-types 2026.1.3 → 2026.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3525 +0,0 @@
1
- /** UI Object page type used to build multi-step "assistant" pages to simplify complex workflows. All data and state for an assistant is tracked automatically throughout the user's session up until completion of the assistant. */
2
- interface NLObjAssistant {
3
- /**
4
- * Add a field to this page and return it.
5
- * @param {string} name field name
6
- * @param {string} type field type
7
- * @param {string} label field label
8
- * @param {number|string} source script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields
9
- * @param {string} group group name that this field will live on. If empty then the field is added to the main section of the page
10
- */
11
- addField(name: string, type: string, label?: string, source?: number|string, group?: string): NLObjField;
12
- /**
13
- * Add a field group to the page.
14
- * @param {string} name field group name
15
- * @param {string} label field group label
16
- */
17
- addFieldGroup(name: string, label: string): NLObjFieldGroup;
18
- /**
19
- * Add a step to the assistant.
20
- * @param {string} name the name of the step
21
- * @param {string} label label used for this step
22
- */
23
- addStep(name: string, label: string): NLObjAssistantStep;
24
- /**
25
- * Add a sublist to this page and return it. For now only sublists of type inlineeditor are supported
26
- * @param {string} name sublist name
27
- * @param {string} type sublist type (inlineeditor only for now)
28
- * @param {string} label sublist label
29
- */
30
- addSubList(name: string, type: string, label: string): NLObjSubList;
31
- /**
32
- * Return an array of the names of all field groups on this page.
33
- */
34
- getAllFieldGroups(): string[];
35
- /**
36
- * Return an array of the names of all fields on this page.
37
- */
38
- getAllFields(): string[];
39
- /**
40
- * Return an array of all the assistant steps for this assistant.
41
- */
42
- getAllSteps(): NLObjAssistantStep[];
43
- /**
44
- * Return an array of the names of all sublists on this page .
45
- */
46
- getAllSubLists(): string[];
47
- /**
48
- * Return current step set via nlobjAssistant.setCurrentStep(step)
49
- */
50
- getCurrentStep(): NLObjAssistantStep;
51
- /**
52
- * Return a field on this page.
53
- * @param {string} name field name
54
- */
55
- getField(name: string): NLObjField;
56
- /**
57
- * Return a field group on this page.
58
- * @param {string} name field group name
59
- */
60
- getFieldGroup(name: string): NLObjFieldGroup;
61
- /**
62
- * Return the last submitted action by the user: next|back|cancel|finish|jump
63
- */
64
- getLastAction(): string;
65
- /**
66
- * Return step from which the last submitted action came from
67
- */
68
- getLastStep(): NLObjAssistantStep;
69
- /**
70
- * Return the next logical step corresponding to the user's last submitted action. You should only call this after
71
- * you have successfully captured all the information from the last step and are ready to move on to the next step. You
72
- * would use the return value to set the current step prior to continuing.
73
- */
74
- getNextStep(): NLObjAssistantStep;
75
- /**
76
- * Return an assistant step on this page.
77
- * @param {string} name step name
78
- */
79
- getStep(name: string): NLObjAssistantStep;
80
- /**
81
- * Return the total number of steps in the assistant.
82
- */
83
- getStepCount(): number;
84
- /**
85
- * Return a sublist on this page.
86
- * @param {string} name sublist name
87
- */
88
- getSubList(name: string): NLObjSubList;
89
- /**
90
- * Return true if the assistant has an error message to display for the current step.
91
- */
92
- hasError(): boolean;
93
- /**
94
- * Return true if all the steps have been completed.
95
- */
96
- isFinished(): boolean;
97
- /**
98
- * Redirect the user following a user submit operation. Use this to automatically redirect the user to the next logical step.
99
- * @param {NLObjResponse} response The response object used to communicate back to the user's client
100
- */
101
- sendRedirect(response: NLObjResponse): void;
102
- /**
103
- * Mark a step as current. It will be highlighted accordingly when the page is displayed
104
- * @param {NLObjAssistantStep} step Assistant step object representing the current step that the user is on.
105
- */
106
- setCurrentStep(step: NLObjAssistantStep): void;
107
- /**
108
- * Set the error message for the current step.
109
- * @param {string} html Error message (rich text) to display on the page to the user.
110
- */
111
- setError(html: string): void;
112
- /**
113
- * Set the values for all the fields on this page.
114
- * @param {Object} values Object of field name/value pairs used to set all fields on page.
115
- */
116
- setFieldValues(values: Object): void;
117
- /**
118
- * Mark assistant page as completed and optionally set the rich text to display on completed page.
119
- * @param {string} html Completion message (rich text) to display on the "Finish" page.
120
- */
121
- setFinished(html: string): void;
122
- /**
123
- * If numbered, step numbers are displayed next to the step's label in the navigation area.
124
- * @param {boolean} numbered If true (default assistant behavior) step numbers will be displayed next to the step label.
125
- */
126
- setNumbered(numbered: boolean): void;
127
- /**
128
- * If ordered, steps are show on left and must be completed sequentially, otherwise steps are shown on top and can be done in any order
129
- * @param {boolean} ordered If true (default assistant behavior) then a navigation order thru the steps/pages will be imposed on the user. Otherwise the user will be allowed to navigate across steps/pages in any order they choose.
130
- */
131
- setOrdered(ordered: boolean): void;
132
- /**
133
- * Set the script ID for Client Script used for this form.
134
- * @param {string|number} script Script ID or internal ID for global client script used to enable Client SuiteScript on page.
135
- */
136
- setScript(script: string|number): void;
137
- /**
138
- * Show/hide shortcut link. Always hidden on external pages.
139
- * @param {boolean} show Enable/disable "Add To Shortcut" link on this page.
140
- */
141
- setShortcut(show: boolean): void;
142
- /**
143
- * Set the splash screen used for this page.
144
- * @param {string} title splash portlet title
145
- * @param {string} text1 splash portlet content (left side)
146
- * @param {string} text2 splash portlet content (right side)
147
- */
148
- setSplash(title: string, text1: string, text2?: string): void;
149
- /**
150
- * Set the page title.
151
- * @param {string} title
152
- */
153
- setTitle(title: string): void;
154
- }
155
-
156
- /** Assistant Step Definition. Used to define individual steps/pages in multi-step workflows. */
157
- interface NLObjAssistantStep {
158
- /**
159
- * Return an array of the names of all fields entered by the user during this step.
160
- */
161
- getAllFields(): string[];
162
- /**
163
- * Return an array of the names of all sublist fields entered by the user during this step
164
- * @param {string} group sublist name
165
- */
166
- getAllLineItemFields(group: string): string[];
167
- /**
168
- * Return an array of the names of all sublists entered by the user during this step.
169
- */
170
- getAllLineItems(): string[];
171
- /**
172
- * Return the value of a field entered by the user during this step.
173
- * @param {string} name field name
174
- */
175
- getFieldValue(name: string): string;
176
- /**
177
- * Return the selected values of a multi-select field as an Array entered by the user during this step.
178
- * @param {string} name multi-select field name
179
- */
180
- getFieldValues(name: string): string[];
181
- /**
182
- * Return the number of lines previously entered by the user in this step (or -1 if the sublist does not exist).
183
- * @param {string} group sublist name
184
- */
185
- getLineItemCount(group: string): number;
186
- /**
187
- * Return the value of a sublist field entered by the user during this step.
188
- * @param {string} group sublist name
189
- * @param {string} name sublist field name
190
- * @param {number} line sublist (1-based)
191
- */
192
- getLineItemValue(group: string, name: string, line: number): string;
193
- /**
194
- * Return the index of this step in the assistant page (1-based).
195
- */
196
- getStepNumber(): number;
197
- /**
198
- * Set helper text for this assistant step.
199
- * @param {string} help inline help text to display on assistant page for this step
200
- */
201
- setHelpText(help: string): NLObjAssistantStep
202
- /**
203
- * Set the label for this assistant step.
204
- * @param {string} label display label used for this assistant step
205
- */
206
- setLabel(label: string): void;
207
-
208
- }
209
-
210
- /** Buttons used for triggering custom behaviors on pages. */
211
- interface NLObjButton {
212
- /**
213
- * Disable or enable button.
214
- * @param {boolean} disabled If true then this button should be disabled on the page.
215
- */
216
- setDisabled(disabled: boolean): NLObjButton;
217
- /**
218
- * Set the label for this button.
219
- * @param {string} label display label for button
220
- */
221
- setLabel(label: string): NLObjButton;
222
- /**
223
- * Sets the button as hidden in the UI. This API is supported on custom buttons and on some standard NetSuite buttons
224
- * @param {boolean} visible Defaults to true if not set. If set to false, the button will be hidden in the UI.
225
- */
226
- setVisible(visible: boolean): NLObjButton;
227
- }
228
-
229
- interface NLObjCache {
230
- get(key: string): string;
231
- /**
232
- * @param {string} key
233
- * @param {string} value
234
- * @param {number} ttl, time to live in seconds.
235
- */
236
- put(key: string, value: string, ttl: number): Object;
237
- remove(key: string): Object;
238
- }
239
-
240
- /** For columns used on scriptable lists and list portlets. */
241
- interface NLObjColumn {
242
- /**
243
- * Add a URL parameter (optionally defined per row) to this column's URL.
244
- *
245
- * @param {string} param the name of a parameter to add to URL
246
- * @param {string} value the value of the parameter to add to URL -or- a column in the datasource that returns the parameter value for each row
247
- * @param {boolean} perRow if true then the 2nd arg is expected to be a column in the datasource
248
- */
249
- addParamToURL(param: string, value: string, perRow?: boolean): void;
250
- /**
251
- * Set the header name for this column.
252
- *
253
- * @param {string} label The label for this column.
254
- */
255
- setLabel(label: string): void;
256
- /**
257
- * Set the base URL (optionally defined per row) for this column.
258
- *
259
- * @param {string} value the base URL or a column in the datasource that returns the base URL for each row
260
- * @param {boolean} perRow if true then the 1st arg is expected to be a column in the datasource
261
- */
262
- setURL(value: string, perRow?: boolean): void;
263
- }
264
-
265
- /** For interacting with setup/configuration pages. */
266
- interface NLObjConfiguration {
267
- /**
268
- * Return an Array of all field names on the record.
269
- */
270
- getAllFields(): string[];
271
- /**
272
- * Return the type corresponding to this setup record.
273
- */
274
- getType(): string;
275
- /**
276
- * Return field metadata for field.
277
- *
278
- * @param {string} fldnam field name
279
- */
280
- getField(fldnam: string): NLObjField;
281
- /**
282
- * Return the text value of a field.
283
- * @restriction only supported for select fields
284
- *
285
- * @param {string} name field name
286
- */
287
- getFieldText(name: string): string;
288
- /**
289
- * Return the selected text values of a multi-select field as an Array.
290
- * @param {string} name field name
291
- */
292
- getFieldTexts(name: string): string[];
293
- /**
294
- * Return the value of a field.
295
- *
296
- * @param {string} name field name
297
- */
298
- getFieldValue(name: string): string;
299
- /**
300
- * Return the selected values of a multi-select field as an Array.
301
- * @restriction only supported for multi-select fields
302
- *
303
- * @param {string} name field name
304
- */
305
- getFieldValues(name: string): string[];
306
- /**
307
- * Set the value of a field.
308
- *
309
- * @param {string} name field name
310
- * @param {string} value field value
311
- */
312
- setFieldValue(name: string, value: string): void;
313
- /**
314
- * Set the values of a multi-select field.
315
- * @restriction only supported for multi-select fields
316
- *
317
- * @param {string} name field name
318
- * @param {string[]} values field values
319
- */
320
- setFieldValues(name: string, values: string[]): void;
321
- /**
322
- * Set the value (via display value) of a field.
323
- * @restriction only supported for select fields
324
- *
325
- * @param {string} name field name
326
- * @param {string} text field display text
327
- */
328
- setFieldText(name: string, text: string): void;
329
- /**
330
- * Set the values (via display values) of a multi-select field.
331
- * @restriction only supported for multi-select fields
332
- *
333
- * @param {string} name Field name.
334
- * @param {string[]} texts Array of field display text values.
335
- */
336
- setFieldTexts(name: string, texts: string[]): void;
337
- }
338
-
339
- /** Utility class providing information about the current user and the script runtime. */
340
- interface NLObjContext {
341
- /**
342
- * Return the account ID of the current user.
343
- */
344
- getCompany(): string;
345
- /**
346
- * Return the deployment ID for the current script.
347
- */
348
- getDeploymentId(): string;
349
- /**
350
- * Return the internalId of the current user's department.
351
- */
352
- getDepartment(): number;
353
- /**
354
- * Return the email address of the current user.
355
- */
356
- getEmail(): string;
357
- /**
358
- * Return the environment that the script is executing in: SANDBOX, PRODUCTION, BETA, INTERNAL.
359
- */
360
- getEnvironment(): string;
361
- /**
362
- * Return the execution context for this script: webServices|csvImport|client|userInterface|scheduledScript|portlet|suitelet|debugger|custommassupdate
363
- */
364
- getExecutionContext(): string;
365
- /**
366
- * Return true if feature is enabled, false otherwise.
367
- * @param {string} name
368
- */
369
- getFeature(name: string): boolean;
370
- /**
371
- * Return the internalId of the current user's location.
372
- */
373
- getLocation(): number;
374
- /**
375
- * Return the logging level for the current script execution. Not supported in CLIENT scripts.
376
- */
377
- getLogLevel(): string;
378
- /**
379
- * Return the name of the current user.
380
- */
381
- getName(): string;
382
- /**
383
- * Return the % complete specified for the current scheduled script execution.
384
- */
385
- getPercentComplete(): number;
386
- /**
387
- * Return current user's permission level (0-4) for this permission.
388
- * @param {string} name
389
- */
390
- getPermission(name: string): number;
391
- /**
392
- * Return system or script preference selection for current user.
393
- * @param {string} name
394
- */
395
- getPreference(name: string): string;
396
- /**
397
- * Returns the number of scheduled script queues in a given account.
398
- */
399
- getQueueCount(): number;
400
- /**
401
- * Return the amount of usage units remaining for this script.
402
- */
403
- getRemainingUsage(): number;
404
- /**
405
- * Return the internalId of the current user's role.
406
- */
407
- getRole(): string;
408
- /**
409
- * Return the internalId of the current user's center type.
410
- */
411
- getRoleCenter(): string;
412
- /**
413
- * Return the script ID of the current user's role.
414
- */
415
- getRoleId(): string;
416
- /**
417
- * Return the script ID for the current script.
418
- */
419
- getScriptId(): string;
420
- /**
421
- * Return value of session object set by script.
422
- * @param {string} name
423
- */
424
- getSessionObject(name: string): string;
425
- /**
426
- * Return a system/script setting. Types are SCRIPT, SESSION, FEATURE, PERMISSION.
427
- *
428
- * @param {string} type
429
- * @param {string} name
430
- *
431
- */
432
- getSetting(type: string, name: string): string;
433
- /**
434
- * Return the internalId of the current user's subsidiary.
435
- */
436
- getSubsidiary(): number;
437
- /**
438
- * Return the internalId of the current user.
439
- */
440
- getUser(): string;
441
- /**
442
- * Return the NetSuite version for the current account.
443
- */
444
- getVersion(): string;
445
- /**
446
- * Set the % complete for the current scheduled script execution.
447
- * @param {number} pct The percentage of records completed
448
- */
449
- setPercentComplete(pct: number): void;
450
- /**
451
- * Set the value of a session object using a key.
452
- * @param {string} name
453
- * @param {string} value
454
- */
455
- setSessionObject(name: string, value: string): void;
456
- /**
457
- * Set a system/script setting. Only supported type is SESSION.
458
- *
459
- * @param {string} type
460
- * @param {string} name
461
- * @param {string} value
462
- *
463
- * @deprecated
464
- */
465
- setSetting(type: string, name: string, value: string): void;
466
- }
467
-
468
- /**
469
- * Return a new instance of nlobjCredentialBuilder
470
- *
471
- * @classDescription The nlobjCredentialBuilder object encapsulates a request string that can be passed to nlapiRequestURLWithCredentials(credentials, url, postdata, headers, httpsMethod).
472
- * @param {string} request can include an embedded GUID (globally unique string).
473
- * @param {string} domain URL’s host name. Host name must exactly match the host name in your URL.
474
- *
475
- * @constructor
476
- */
477
- declare function nlobjCredentialBuilder(request: string, domain: string): NLObjCredentialBuilder;
478
- interface NLObjCredentialBuilder {
479
- /**
480
- * Appends a passed in string to an nlobjCredentialBuilder object.
481
- *
482
- * @param {string} string String to be appended.
483
- */
484
- append(string: string): NLObjCredentialBuilder;
485
- /**
486
- * Encodes an nlobjCredentialBuilder object per the base64 scheme.
487
- */
488
- base64(): NLObjCredentialBuilder;
489
- /**
490
- * Hashes an nlobjCredentialBuilder object with the MD5 hash function.
491
- */
492
- md5(): NLObjCredentialBuilder;
493
- /**
494
- * Replaces all instances of string1 with string2.
495
- *
496
- * @param {string} string1 String to be replaced
497
- * @param {string} string2 String to be replaced with
498
- */
499
- replace(string1: string, string2: string): NLObjCredentialBuilder;
500
- /**
501
- * Hashes an nlobjCredentialBuilder object with the SHA-256 hash function.
502
- */
503
- sha256(): NLObjCredentialBuilder;
504
- /**
505
- * Encodes an nlobjCredentialBuilder object per the UTF-8 scheme.
506
- */
507
- utf8(): NLObjCredentialBuilder;
508
- }
509
-
510
- interface NLObjCSVImport {
511
- /**
512
- * Sets the data to be imported in a linked file for a multi-file import job, by referencing a file in the file cabinet using nlapiLoadFile(id), or by inputting CSV data as raw string.
513
- *
514
- * @param {string} sublist The internal ID of the record sublist for which data is being imported.
515
- * @param {string|NLObjFile} file Raw data or nlobjFile object containing CSV data.
516
- */
517
- setLinkedFile(sublist: string, file: string|NLObjFile): NLObjCSVImport;
518
- /**
519
- * Sets the name of the saved import map to be used for an import, by referencing the internal ID or script ID of the import map.
520
- *
521
- * @param {string} savedImport The internal ID or script ID of the saved mapping to use for the import job.
522
- */
523
- setMapping(savedImport: string): void;
524
- /**
525
- * Sets the name of the saved import map to be used for an import, by referencing the internal ID or script ID of the import map.
526
- *
527
- * @param {string} option The name of the option; in this case, jobName.
528
- * @param {string} value The value for the jobName option, meaning the text to be displayed in the Job Name column at Setup > Import/Export > View CSV Import Status.
529
- */
530
- setOption(option: string, value: string): void;
531
- /**
532
- * Sets the data to be imported in the primary file for an import job, by referencing a file in the file cabinet using nlapiLoadFile, or by inputting CSV data as raw string.
533
- *
534
- * @param {string|NLObjFile} file Raw data or nlobjFile object containing CSV data.
535
- */
536
- setPrimaryFile(file: string|NLObjFile): void;
537
- /**
538
- * Sets the data to be imported in the primary file for an import job, by referencing a file in the file cabinet using nlapiLoadFile, or by inputting CSV data as raw string.
539
- *
540
- * @param {string} queue The new queue number. Valid values range from '1' to '5', depending upon the SuiteCloud License.
541
- */
542
- setQueue(queue: string): void;
543
- }
544
-
545
- interface NLObjDuplicateJobRequest {
546
- setEntityType(entityType: string): void;
547
- setMasterId(masterID: string): void;
548
- setMasterSelectionMode(masterSelectionMode: string): void;
549
- setOperation(operation: string): void;
550
- setRecords(dupeRecords: string[]): void;
551
- }
552
-
553
- interface NLObjEmailMerger {
554
- /**
555
- * Perform the merge and return an object containing email subject and body.
556
- * @governance 20 units
557
- */
558
- merge(): { subject: string, body: string };
559
- /**
560
- * Associate a custom record to the merger.
561
- * @param {string} recordType type of the custom record
562
- * @param {number} recordId ID of the record to be associated with the merger
563
- */
564
- setCustomRecord(recordType: string, recordId: number): void;
565
- /**
566
- * Associate an entity to the merger.
567
- * @param {string} entityType type of the entity (customer/contact/partner/vendor/employee)
568
- * @param {number} entityId ID of the entity to be associated with the merger
569
- */
570
- setEntity(entityType: string, entityId: number): void;
571
- /**
572
- * Associate a second entity (recipient) to the merger.
573
- * @param {string} recipientType type of the entity (customer/contact/partner/vendor/employee)
574
- * @param {number} recipientId ID of the entity to be associated with the merger
575
- */
576
- setRecipient(recipientType: string, recipientId: number): void;
577
- /**
578
- * Associate a support case to the merger.
579
- * @param {number} caseId ID of the support case to be associated with the merger
580
- */
581
- setSupportCase(caseId: number): void;
582
- /**
583
- * Associate a transaction to the merger
584
- * @param {number} transactionId ID of the transaction to be associated with the merger
585
- */
586
- setTransaction(transactionId: number): void;
587
- }
588
-
589
- /**
590
- * Return a new instance of nlobjError used system or user-defined error object.
591
- *
592
- * @classDescription Encapsulation of errors thrown during script execution.
593
- *
594
- * @constructor
595
- */
596
- declare function nlobjError(): NLObjError;
597
- interface NLObjError {
598
- /**
599
- * Return the error code for this system or user-defined error.
600
- */
601
- getCode(): string;
602
- /**
603
- * Return the error description for this error.
604
- */
605
- getDetails(): string;
606
- /**
607
- * Return the error db ID for this error (if it was an unhandled unexpected error).
608
- */
609
- getId(): string;
610
- /**
611
- * Return the internalid of the record if this error was thrown in an aftersubmit script.
612
- */
613
- getInternalID(): number;
614
- /**
615
- * Return a stacktrace containing the location of the error.
616
- */
617
- getStackTrace(): string[];
618
- /**
619
- * Return the userevent script name where this error was thrown.
620
- */
621
- getUserEvent(): string;
622
- }
623
-
624
- interface NLObjField {
625
- /**
626
- * Add a select option to this field (valid for select/multiselect fields). This method is only supported on scripted fields via the UI Object API.
627
- *
628
- * @param {string} value internal ID for this select option
629
- * @param {string} text display value for this select option
630
- * @param {boolean} selected if true then this select option will be selected by default
631
- */
632
- addSelectOption(value: string, text: string, selected?: boolean): void;
633
- /**
634
- * Return field label.
635
- */
636
- getLabel(): string;
637
- /**
638
- * Return field name.
639
- */
640
- getName(): string;
641
- /**
642
- * This method can only be used in server contexts against a record object. Also note that a call to this method may return different results for the same field for different roles.
643
- *
644
- * @param {string} filter A search string to filter the select options that are returned.
645
- * @param {string} filteroperator Supported operators are contains | is | startswith. If not specified, defaults to the contains operator.
646
- */
647
- getSelectOptions(filter?: string, filteroperator?: string): NLObjSelectOption[];
648
- /**
649
- * Return field type.
650
- */
651
- getType(): string;
652
- /**
653
- * Set the alias used to set the value for this field. Defaults to field name. This method is only supported on scripted fields via the UI Object API.
654
- *
655
- * @param {string} alias Column used to populate the field (mostly relevant when populating sublist fields).
656
- */
657
- setAlias(alias: string): NLObjField;
658
- /**
659
- * Set the break type (startcol|startrow|none) for this field. startrow is only used for fields with a layout type of outside. This method is only supported on scripted fields via the UI Object API.
660
- *
661
- * @param {string} breaktype Break type used to add a break in flow layout for this field: startcol | startrow | none.
662
- */
663
- setBreakType(breaktype: string): NLObjField;
664
- /**
665
- * Set the default value for this field. This method is only supported on scripted fields via the UI Object API.
666
- *
667
- * @param {string} value
668
- */
669
- setDefaultValue(value: string): NLObjField;
670
- /**
671
- * Set the width and height for this field. This method is only supported on scripted fields via the UI Object API.
672
- *
673
- * @param {number} width
674
- * @param {number} height
675
- */
676
- setDisplaySize(width: number, height?: number): NLObjField;
677
- /**
678
- * Set the display type for this field. This method is only supported on scripted fields via the UI Object API
679
- *
680
- * @param {string} type display type: inline|normal|hidden|disabled|readonly|entry
681
- */
682
- setDisplayType(type: string): NLObjField;
683
- /**
684
- * Set help text for this field. If inline is set on assistant pages, help is displayed inline below field. This method is only supported on scripted fields via the UI Object API.
685
- *
686
- * @param {string} help Field level help content (rich text) for field.
687
- * @param {string} inline If true then in addition to the popup field help, the help will also be displayed inline below field (supported on assistant pages only).
688
- */
689
- setHelpText(help: string, inline?: boolean): NLObjField;
690
- /**
691
- * Set the label for this field. This method is only supported on scripted fields via the UI Object API.
692
- *
693
- * @param {string} label
694
- */
695
- setLabel(label: string): NLObjField;
696
- /**
697
- * Set the layout type and optionally the break type. This method is only supported on scripted fields via the UI Object API
698
- *
699
- * @param {string} type Layout type: outside|startrow|midrow|endrow|normal
700
- * @param {string} breaktype Break type: startcol|startrow|none
701
- */
702
- setLayoutType(type: string, breaktype?: string): NLObjField;
703
- /**
704
- * Set the text that gets displayed in lieu of the field value for URL fields.
705
- *
706
- * @param {string} text user-friendly display value in lieu of URL
707
- */
708
- setLinkText(text: string): NLObjField;
709
- /**
710
- * Make this field mandatory. This method is only supported on scripted fields via the UI Object API
711
- *
712
- * @param {boolean} mandatory if true then field becomes mandatory
713
- */
714
- setMandatory(mandatory: boolean): NLObjField;
715
- /**
716
- * Set the maxlength for this field (only valid for certain field types). This method is only supported on scripted fields via the UI Object API.
717
- *
718
- * @param {number} maxLength maximum length for this field
719
- */
720
- setMaxLength(maxLength: number): NLObjField;
721
- /**
722
- * Set the amount of empty vertical space (rows) between this field and the previous field. This method is only supported on scripted fields via the UI Object API.
723
- *
724
- * @param {number} padding # of empty rows to display above field
725
- */
726
- setPadding(padding: number): NLObjField;
727
- }
728
-
729
- interface NLObjFieldGroup {
730
- /**
731
- * Set collapsibility property for this field group.
732
- *
733
- * @param {boolean} collapsible if true then this field group is collapsible
734
- * @param {boolean} defaultcollapsed if true and the field group is collapsible, collapse this field group by default
735
- */
736
- setCollapsible(collapsible: boolean, defaultcollapsed?: boolean): NLObjFieldGroup;
737
- /**
738
- * Set the label for this field group.
739
- * @param {string} label display label for field group
740
- */
741
- setLabel(label: string): NLObjFieldGroup;
742
- /**
743
- * Set showBorder property for this field group.
744
- *
745
- * @param {boolean} showBorder If true then this field group shows border including label of group.
746
- */
747
- setShowBorder(showBorder: boolean): NLObjFieldGroup;
748
- /**
749
- * Set singleColumn property for this field group.
750
- *
751
- * @param {boolean} singleColumn if true then this field group is displayed in single column
752
- */
753
- setSingleColumn(singleColumn: boolean): NLObjFieldGroup;
754
- }
755
-
756
- interface NLObjFile {
757
- /**
758
- * Return the file description.
759
- */
760
- getDescription(): string;
761
- /**
762
- * Return the internal ID of the folder that this file is in.
763
- */
764
- getFolder(): number;
765
- /**
766
- * Return the id of the file (if stored in the FC).
767
- */
768
- getId(): number;
769
- /**
770
- * Return the name of the file.
771
- */
772
- getName(): string;
773
- /**
774
- * Return the size of the file in bytes.
775
- */
776
- getSize(): number;
777
- /**
778
- * Return the type of the file.
779
- */
780
- getType(): string;
781
- /**
782
- * Return the URL of the file (if stored in the FC).
783
- */
784
- getURL(): string;
785
- /**
786
- * Return the value (base64 encoded for binary types) of the file.
787
- */
788
- getValue(): string;
789
- /**
790
- * Return true if the file is inactive.
791
- */
792
- isInactive(): boolean;
793
- /**
794
- * Return true if the file is "Available without Login".
795
- */
796
- isOnline(): boolean;
797
- /**
798
- * Sets the file's description.
799
- * @param {string} description the file description
800
- */
801
- setDescription(description: string): void;
802
- /**
803
- * Sets the character encoding for the file.
804
- * @param {string} encoding
805
- */
806
- setEncoding(encoding: string): void;
807
- /**
808
- * Sets the internal ID of the folder that this file is in.
809
- * @param {number} folder
810
- */
811
- setFolder(folder: number): void;
812
- /**
813
- * Sets the file's inactive status.
814
- * @param {boolean} inactive
815
- */
816
- setIsInactive(inactive: boolean): void;
817
- /**
818
- * Sets the file's "Available without Login" status.
819
- * @param {boolean} online
820
- */
821
- setIsOnline(online: boolean): void;
822
- /**
823
- * Sets the name of a file.
824
- * @param {string} name the name of the file.
825
- */
826
- setName(name: string): void;
827
-
828
- }
829
-
830
- interface NLObjForm {
831
- /**
832
- * Add a button to this form.
833
- *
834
- * @param {string} name button name
835
- * @param {string} label button label
836
- * @param {string} script button script (function name)
837
- */
838
- addButton(name: string, label: string, script: string): NLObjButton;
839
- /**
840
- * Adds a field that lets you store credentials in NetSuite to be used when invoking services provided by third parties.
841
- *
842
- * @param {string} id The internal ID of the credential field.
843
- * @param {string} label The UI label for the credential field.
844
- * @param {string} website The domain the credentials can be sent to.
845
- * @param {string} scriptId The scriptId of the script that is allowed to use this credential field.
846
- * @param {string} value If you choose, you can set an initial value for this field. This value is the handle to the credentials.
847
- * @param {boolean} entityMatch Controls whether use of nlapiRequestUrlWithCredentials with this credential is restricted to the same entity that originally entered the credential.
848
- * @param {string} tab The tab parameter can be used to specify either a tab or a field group (if you have added nlobjFieldGroup objects to your form).
849
- */
850
- addCredentialField(id: string, label: string, website?: string, scriptId?: string, value?: string, entityMatch?: boolean, tab?: string): NLObjField;
851
- /**
852
- * Add a field (nlobjField) to this form and return it.
853
- *
854
- * @param {string} name field name
855
- * @param {string} type field type
856
- * @param {string} label field label
857
- * @param {string|number} sourceOrRadio Script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields
858
- * @param {string} tab Tab name that this field will live on. If empty then the field is added to the main section of the form (immediately below the title bar).
859
- */
860
- addField(name: string, type: string, label: string, sourceOrRadio?: string|number, tab?: string): NLObjField;
861
- /**
862
- * Add a field group to the form.
863
- * @param {string} name field group name
864
- * @param {string} label field group label
865
- * @param {string} tab
866
- */
867
- addFieldGroup(name: string, label: string, tab?: string): NLObjFieldGroup;
868
- /**
869
- * Add a navigation cross-link to the page.
870
- *
871
- * @param {string} type page link type: crosslink|breadcrumb
872
- * @param {string} title page link title
873
- * @param {string} url URL for page link
874
- */
875
- addPageLink(type: string, title: string, url: string): void;
876
- /**
877
- * Add a reset button to this form.
878
- *
879
- * @param {string} label Label for this button. defaults to "Reset".
880
- */
881
- addResetButton(label?: string): NLObjButton;
882
- /**
883
- * Add a sublist (nlobjSubList) to this form and return it.
884
- *
885
- * @param {string} name sublist name
886
- * @param {string} type sublist type: inlineeditor|editor|list|staticlist
887
- * @param {string} label sublist label
888
- * @param {string} tab parent tab that this sublist lives on. If empty, it is added to the main tab
889
- */
890
- addSubList(name: string, type: string, label: string, tab?: string): NLObjSubList;
891
- /**
892
- * Add a submit button to this form.
893
- *
894
- * @param {string} label Label for this submit button. Defaults to "Save".
895
- */
896
- addSubmitButton(label?: string): NLObjButton;
897
- /**
898
- * Add a subtab (nlobjTab) to this form and return it.
899
- *
900
- * @param {string} name subtab name
901
- * @param {string} label subtab label
902
- * @param {string} tab parent tab that this subtab lives on. If empty, it is added to the main tab.
903
- */
904
- addSubTab(name: string, label: string, tab?: string): NLObjTab;
905
- /**
906
- * Add a tab (nlobjTab) to this form and return it.
907
- *
908
- * @param {string} name tab name
909
- * @param {string} label tab label
910
- */
911
- addTab(name: string, label: string): NLObjTab;
912
- /**
913
- * Get a button from this form by name.
914
- * @param {string} name Button Id.
915
- */
916
- getButton(name: string): NLObjButton;
917
- /**
918
- * Return a field (nlobjField) on this form.
919
- *
920
- * @param {string} name field name
921
- * @param {string} radio If this is a radio field, specify which radio field to return based on radio value.
922
- */
923
- getField(name: string, radio?: string): NLObjField;
924
- /**
925
- * Return a sublist (nlobjSubList) on this form.
926
- *
927
- * @param {string} name sublist name
928
- */
929
- getSubList(name: string): NLObjSubList;
930
- /**
931
- * Return a subtab (nlobjTab) on this form.
932
- *
933
- * @param {string} name subtab name
934
- */
935
- getSubTab(name: string): NLObjTab;
936
- /**
937
- * Return a tab (nlobjTab) on this form.
938
- *
939
- * @param {string} name Tab name.
940
- */
941
- getTab(name: string): NLObjTab;
942
- /**
943
- * Get a list of all tabs.
944
- */
945
- getTabs(): string[];
946
- /**
947
- * Insert a field (nlobjField) before another field (name).
948
- *
949
- * @param {NLObjField} field The field object to insert.
950
- * @param {string} nextfld The name of the field before which to insert this field.
951
- */
952
- insertField(field: NLObjField, nextfld: string): NLObjField;
953
- /**
954
- * Insert a sublist (nlobjSubList) before another subtab or sublist (name).
955
- *
956
- * @param {NLObjSubList} sublist The sublist object to insert.
957
- * @param {string} nextsublist The name of the sublist before which to insert this sublist.
958
- */
959
- insertSubList(sublist: NLObjSubList, nextsublist: string): NLObjSubList;
960
- /**
961
- * Insert a subtab (nlobjTab) before another subtab or sublist (name).
962
- *
963
- * @param {NLObjTab} subtab The subtab object to insert.
964
- * @param {string} nextsubtab The name of the subtab before which to insert this subtab.
965
- */
966
- insertSubTab(subtab: NLObjTab, nextsubtab: string): NLObjTab;
967
- /**
968
- * Insert a tab (nlobjTab) before another tab (name).
969
- *
970
- * @param {NLObjTab} tab the tab object to insert
971
- * @param {string} nexttab the name of the tab before which to insert this tab
972
- */
973
- insertTab(tab: NLObjTab, nexttab: string): NLObjTab;
974
- /**
975
- * Removes an nlobjButton object. This method can be used on custom buttons and certain built-in NetSuite buttons.
976
- * @param {string} name
977
- */
978
- removeButton(name: string): void;
979
- /**
980
- * Set the values for all the fields on this form.
981
- *
982
- * @param {Object} values Object containing field name/value pairs
983
- */
984
- setFieldValues(values: Object): void;
985
- /**
986
- * Set the Client Script definition used for this page.
987
- *
988
- * @param {string|number} script Script ID or internal ID for global client script used to enable Client SuiteScript on page
989
- */
990
- setScript(script: string|number): void;
991
- /**
992
- * Set the page title.
993
- *
994
- * @param {string} title
995
- */
996
- setTitle(title: string): void;
997
- }
998
-
999
- interface NLObjFuture {
1000
- cancel(): boolean;
1001
- getId(): string;
1002
- isCancelled(): boolean;
1003
- isDone(): boolean;
1004
- }
1005
-
1006
- interface NLObjJobManager {
1007
- createJobRequest(): NLObjJobRequest;
1008
- getFuture(): NLObjFuture;
1009
- submit(request: NLObjJobRequest): string;
1010
- }
1011
-
1012
- interface NLObjJobRequest {
1013
-
1014
- }
1015
-
1016
- interface NLObjList {
1017
- /**
1018
- * Add a column (nlobjColumn) to this list and return it.
1019
- *
1020
- * @param {string} name column name
1021
- * @param {string} type column type
1022
- * @param {string} label column label
1023
- * @param {string} align column alignment
1024
- */
1025
- addColumn(name: string, type: string, label: string, align?: string): NLObjColumn;
1026
- /**
1027
- * Add an Edit column (nlobjColumn) to the left of the column specified.
1028
- *
1029
- * @param {NLObjColumn} column
1030
- * @param {boolean} showView should Edit|View instead of Edit link
1031
- * @param {string} showHref column that evaluates to T or F that determines whether to disable the edit|view link per-row.
1032
- */
1033
- addEditColumn(column: NLObjColumn, showView: boolean, showHref?: string): NLObjColumn;
1034
- /**
1035
- * Add a navigation cross-link to the page.
1036
- *
1037
- * @param {string} type page link type: crosslink|breadcrumb
1038
- * @param {string} title page link title
1039
- * @param {string} url URL for page link
1040
- */
1041
- addPageLink(type: string, title: string, url: string): void;
1042
- /**
1043
- * Add a row (Array of name-value pairs or nlobjSearchResult) to this portlet.
1044
- *
1045
- * @param {string[]|NLObjSearchResult} row data used to add a single row
1046
- */
1047
- addRow(row: string[]|NLObjSearchResult): void;
1048
- /**
1049
- * Add multiple rows (Array of nlobjSearchResults or name-value pair Arrays) to this portlet.
1050
- *
1051
- * @param {string[][]|NLObjSearchResult[]} rows data used to add multiple rows
1052
- */
1053
- addRows(rows: string[][]|NLObjSearchResult[]): void;
1054
- /**
1055
- * Set the Client SuiteScript used for this page.
1056
- *
1057
- * @param {string|number} script script ID or internal ID for global client script used to enable Client SuiteScript on page
1058
- */
1059
- setScript(script: string|number): void;
1060
- /**
1061
- * Set the global style for this list: grid|report|plain|normal.
1062
- *
1063
- * @param {string} style overall style used to render list
1064
- */
1065
- setStyle(style: string): void;
1066
- /**
1067
- * Set the page title.
1068
- *
1069
- * @param {string} title
1070
- */
1071
- setTitle(title: string): void;
1072
- }
1073
-
1074
- interface NLObjLogin {
1075
- /**
1076
- * @param {string} currentPassword
1077
- * @param {string} newEmail new Email
1078
- * @param {boolean} justThisAccount indicates whether to apply email change only to roles within this account or apply email change to its all NetSuite accounts and roles
1079
- */
1080
- changeEmail(currentPassword: string, newEmail: string, justThisAccount: boolean): void;
1081
- /**
1082
- * @param {string} currentPassword
1083
- * @param {string} newPassword New Password.
1084
- */
1085
- changePassword(currentPassword: string, newPassword: string): void;
1086
- }
1087
-
1088
- interface NLObjMergeResult {
1089
- /**
1090
- * Use this method to get the body of the email distribution in string format.
1091
- */
1092
- getBody(): string;
1093
-
1094
- /**
1095
- * Use this method to get the subject of the email distribution in string format.
1096
- */
1097
- getSubject(): string;
1098
- }
1099
-
1100
- interface NLObjPivotColumn {
1101
- /**
1102
- * Get the column alias.
1103
- */
1104
- getAlias(): string;
1105
- /**
1106
- * Get the column hierarchy.
1107
- */
1108
- getColumnHierarchy(): NLObjPivotColumn;
1109
- /**
1110
- * Get dependency for specified alias.
1111
- */
1112
- getDependency(alias: string): Object;
1113
- /**
1114
- * Get the column label.
1115
- */
1116
- getLabel(): string;
1117
- /**
1118
- * Get the summary line.
1119
- */
1120
- getSummaryLine(): NLObjPivotColumn;
1121
- }
1122
-
1123
- interface NLObjPivotRow {
1124
- /**
1125
- * Get the row alias.
1126
- */
1127
- getAlias(): string;
1128
- /**
1129
- * Get the children rows if there are any.
1130
- */
1131
- getChildren(): NLObjPivotRow[];
1132
- /**
1133
- * Get the opening line.
1134
- */
1135
- getOpeningLine(): NLObjPivotRow;
1136
- /**
1137
- * Get the parent row.
1138
- */
1139
- getParent(): NLObjPivotRow;
1140
- /**
1141
- * Get the summary line from the report.
1142
- */
1143
- getSummaryLine(): NLObjPivotRow;
1144
- }
1145
-
1146
- interface NLObjPivotTable {
1147
- /**
1148
- * Get the parent column.
1149
- */
1150
- getParent(): NLObjPivotColumn;
1151
- /**
1152
- * Get the row hierarchy.
1153
- */
1154
- getRowHierarchy(): NLObjPivotRow;
1155
- }
1156
-
1157
- interface NLObjPivotTableHandle {
1158
- /**
1159
- * Get the pivot table object from the report definition.
1160
- */
1161
- getPivotTable(): NLObjPivotTable;
1162
- /**
1163
- * Returns the completion status flag of the report definition execution.
1164
- */
1165
- isReady(): boolean;
1166
- }
1167
-
1168
- interface NLObjPortlet {
1169
- /**
1170
- * Add a column (nlobjColumn) to this LIST portlet and return it.
1171
- *
1172
- * @param {string} name column name
1173
- * @param {string} type column type
1174
- * @param {string} label column label
1175
- * @param {string} align column alignment
1176
- */
1177
- addColumn(name: string, type: string, label: string, align?: string): NLObjColumn;
1178
- /**
1179
- * Add an Edit column (nlobjColumn) to the left of the column specified (supported on LIST portlets only).
1180
- *
1181
- * @param {NLObjColumn} column
1182
- * @param {boolean} showView should Edit|View instead of Edit link
1183
- * @param {string} showHref column that evaluates to T or F that determines whether to disable the edit|view link per-row.
1184
- */
1185
- addEditColumn(column: NLObjColumn, showView: boolean, showHref?: string): NLObjColumn;
1186
- /**
1187
- * add a field (nlobjField) to this FORM portlet and return it.
1188
- *
1189
- * @param {string} name field name
1190
- * @param {string} type field type
1191
- * @param {string} label field label
1192
- * @param {string|number} source Script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields
1193
- */
1194
- addField(name: string, type: string, label?: string, source?: string|number): NLObjField;
1195
- /**
1196
- * Add a line (containing text or simple HTML) with optional indenting and URL to this LINKS portlet.
1197
- *
1198
- * @param {string} text data to output to line
1199
- * @param {string} url URL if this line should be clickable (if NULL then line will not be clickable)
1200
- * @param {number} indent Number of indents to insert before text
1201
- */
1202
- addLine(text: string, url?: string, indent?: number): void;
1203
- /**
1204
- * Add a row (nlobjSearchResult or Array of name-value pairs) to this LIST portlet.
1205
- *
1206
- * @param {string[]|NLObjSearchResult} row
1207
- */
1208
- addRow(row: string[]|NLObjSearchResult): void;
1209
- /**
1210
- * Add multiple rows (Array of nlobjSearchResults or name-value pair Arrays) to this LIST portlet.
1211
- *
1212
- * @param {string[][]|NLObjSearchResult[]} rows
1213
- */
1214
- addRows(rows: string[][]|NLObjSearchResult[]): void;
1215
- /**
1216
- * Set the entire contents of the HTML portlet (will be placed inside a <TD>...</TD>).
1217
- *
1218
- * @param {string} html
1219
- */
1220
- setHtml(html: string): void;
1221
- /**
1222
- * Sets the regular interval when a FORM portlet automatically refreshes itself.
1223
- *
1224
- * @restriction This API is only available if the portlet type is FORM.
1225
- *
1226
- * @param {number} n Number of seconds. In production mode, this value must be at least 60 seconds. An error is raised if this value is less than zero, and in production if it is less than 60.
1227
- */
1228
- setRefreshInterval(n: number): void;
1229
- /**
1230
- * Sets the client-side script for a FORM portlet. Setting another script implicitly removes the previous script.
1231
- *
1232
- * @param {number|string} scriptId The script internalId or custom scriptId of a record-level client script.
1233
- */
1234
- setScript(scriptId: number|string): void;
1235
- /**
1236
- * Add a FORM submit button to this FORM portlet.
1237
- *
1238
- * @param {string} url URL that this form portlet will POST to
1239
- * @param {string} label label for submit button (defaults to Save)
1240
- * @param {string} target The target attribute of the portlet's FORM element
1241
- */
1242
- setSubmitButton(url: string, label?: string, target?: string): void;
1243
- /**
1244
- * Set the portlet title.
1245
- *
1246
- * @param {string} title
1247
- */
1248
- setTitle(title: string): void;
1249
- }
1250
-
1251
- interface NLObjRecord {
1252
- /**
1253
- * Commit the current line in a sublist.
1254
- *
1255
- * @param {string} group sublist name
1256
- */
1257
- commitLineItem(group: string): void;
1258
- /**
1259
- * Returns a nlobjSubrecord object. Use this API to create a subrecord from a sublist field on the parent record.
1260
- *
1261
- * @param {string} sublist The sublist internal ID on the parent record.
1262
- * @param {string} fldname The internal ID of the 'subrecord field' on the sublist of the parent record.
1263
- */
1264
- createCurrentLineItemSubrecord(sublist: string, fldname: string): NLObjSubrecord;
1265
- /**
1266
- * Returns a nlobjSubrecord object. Use this API to create a subrecord from a body field on the parent record.
1267
- *
1268
- * @param {string} fldname The internal ID of the 'subrecord field' on the body of the parent record.
1269
- */
1270
- createSubrecord(fldname: string): NLObjSubrecord;
1271
- /**
1272
- * Returns a nlobjSubrecord object. Use this API to edit a subrecord from a sublist field on the parent record.
1273
- *
1274
- * @param {string} sublist The sublist internal ID on the parent record
1275
- * @param {string} fldname The internal ID of the 'subrecord field' on the sublist of the parent record
1276
- */
1277
- editCurrentLineItemSubrecord(sublist: string, fldname: string): NLObjSubrecord;
1278
- /**
1279
- * Returns a nlobjSubrecord object. Use this API to edit a subrecord from a body field on the parent record.
1280
- *
1281
- * @param {string} fldname The internal ID of the 'subrecord field' on the body of the parent record.
1282
- */
1283
- editSubrecord(fldname: string): NLObjSubrecord;
1284
- /**
1285
- * Return line number for 1st occurrence of field value in a sublist column.
1286
- *
1287
- * @param {string} group sublist name
1288
- * @param {string} fldnam sublist field name
1289
- * @param {number} column matrix column index (1-based)
1290
- * @param {string} value matrix field value
1291
- */
1292
- findLineItemMatrixValue(group: string, fldnam: string, column: number, value: string): number;
1293
- /**
1294
- * Return line number for 1st occurrence of field value in a sublist column.
1295
- *
1296
- * @param {string} group sublist name
1297
- * @param {string} fldnam sublist field name
1298
- * @param {string} value sublist field value
1299
- */
1300
- findLineItemValue(group: string, fldnam: string, value: string): number;
1301
- /**
1302
- * Return an Array of all field names on the record.
1303
- */
1304
- getAllFields(): string[];
1305
- /**
1306
- * Return an Array of all field names on a record for a particular sublist.
1307
- *
1308
- * @param {string} group sublist name
1309
- */
1310
- getAllLineItemFields(group: string): string[];
1311
- /**
1312
- * Return the current value of a sublist field.
1313
- *
1314
- * @param {string} group sublist name
1315
- * @param {string} name sublist field name
1316
- * @param {string} timezone
1317
- */
1318
- getCurrentLineItemDateTimeValue(group: string, name: string, timezone?: string): string;
1319
- /**
1320
- * Return the current value of a sublist matrix field.
1321
- *
1322
- * @param {string} group matrix sublist name
1323
- * @param {string} name matrix field name
1324
- * @param {number} column matrix field column index (1-based)
1325
- */
1326
- getCurrentLineItemMatrixValue(group: string, name: string, column: number): string;
1327
- /**
1328
- * Return the current text of a sublist field. This isn't documented, but it works as of 2017.2.
1329
- *
1330
- * @param {string} group sublist name
1331
- * @param {string} name sublist field name
1332
- */
1333
- getCurrentLineItemText(group: string, name: string): string;
1334
- /**
1335
- * Return the current value of a sublist field.
1336
- *
1337
- * @param {string} group sublist name
1338
- * @param {string} name sublist field name
1339
- */
1340
- getCurrentLineItemValue(group: string, name: string): string;
1341
- /**
1342
- * Returns the values of a multiselect sublist field on the currently selected line. One example of a multiselect sublist field is the Serial Numbers field on the Items sublist.
1343
- * @restriction This function is not supported in client SuiteScript. It is meant to be used in user event scripts.
1344
- *
1345
- * @param {string} type The sublist internal ID
1346
- * @param {string} fldname The name of the multiselect field
1347
- */
1348
- getCurrentLineItemValues(type: string, fldname: string): string[];
1349
- /**
1350
- * Return the value of a field on the current record on a page.
1351
- * @restriction supported in client and user event scripts only.
1352
- * @param {string} fldnam the field name
1353
- * @param {string} timezone [optional] Olson value
1354
- */
1355
- getDateTimeValue(fldnam: string, timezone?: string): string;
1356
- /**
1357
- * Return field metadata for field.
1358
- * @param {string} fldnam Field name
1359
- */
1360
- getField(fldnam: string): NLObjField;
1361
- /**
1362
- * Return the display value for a select field.
1363
- * @restriction only supported for select fields
1364
- *
1365
- * @param {string} name Field name
1366
- */
1367
- getFieldText(name: string): string;
1368
- /**
1369
- * Return the selected display values of a multi-select field as an Array.
1370
- * @restriction only supported for multi-select fields
1371
- *
1372
- * @param {string} name Field name
1373
- */
1374
- getFieldTexts(name: string): string[];
1375
- /**
1376
- * Return the value of a field.
1377
- *
1378
- * @param {string} name Field name.
1379
- */
1380
- getFieldValue(name: string): string;
1381
- /**
1382
- * Return the selected values of a multi-select field as an Array.
1383
- *
1384
- * @param {string} name Field name.
1385
- */
1386
- getFieldValues(name: string): string[];
1387
- /**
1388
- * Return the internalId of the record or NULL for new records.
1389
- */
1390
- getId(): number;
1391
- /**
1392
- * Return the number of lines in a sublist.
1393
- *
1394
- * @param {string} group sublist name
1395
- */
1396
- getLineItemCount(group: string): number | string;
1397
- /**
1398
- * Return the value of a sublist field.
1399
- *
1400
- * @param {string} group sublist name
1401
- * @param {string} name sublist field name
1402
- * @param {number} line line number (1-based)
1403
- * @param {string} timezone value
1404
- */
1405
- getLineItemDateTimeValue(group: string, name: string, line: number, timezone?: string): string;
1406
- /**
1407
- * Return metadata for sublist field.
1408
- *
1409
- * @param {string} type Sublist name
1410
- * @param {string} fldnam Sublist field name
1411
- * @param {int} linenum Line number (1-based). If empty, the current sublist field is returned. Only settable for sublists of type list.
1412
- */
1413
- getLineItemField(type: string, fldnam: string, linenum?: number): NLObjField;
1414
- /**
1415
- * Return metadata for sublist field.
1416
- *
1417
- * @param {string} type Matrix sublist name
1418
- * @param {string} fldnam Matrix field name
1419
- * @param {number} linenum Line number
1420
- * @param {number} column Matrix column (1-based)
1421
- */
1422
- getLineItemMatrixField(type: string, fldnam: string, linenum: number, column: number): NLObjField;
1423
- /**
1424
- * Use this API to get the value of a matrix field that appears on a specific line in a specific column. This API can be used only in the context of a matrix sublist.
1425
- *
1426
- * @param {string} group The sublist internal ID
1427
- * @param {string} fldnam The internal ID of the matrix field whose value you want returned
1428
- * @param {number} linenum The line number for this field. Note the first line number on a sublist is 1 (not 0).
1429
- * @param {number} column The column number for this field. Column numbers start at 1 (not 0).
1430
- */
1431
- getLineItemMatrixValue(group: string, fldnam: string, linenum: number, column: number): string;
1432
- /**
1433
- * Return the text value of a sublist field.
1434
- *
1435
- * @param {string} group sublist name
1436
- * @param {string} name sublist field name
1437
- * @param {number} line line number (1-based)
1438
- */
1439
- getLineItemText(group: string, name: string, line: number): string;
1440
- /**
1441
- * Return the value of a sublist field.
1442
- *
1443
- * @param {string} group sublist name
1444
- * @param {string} name sublist field name
1445
- * @param {number} line line number (1-based)
1446
- */
1447
- getLineItemValue(group: string, name: string, line: number): string;
1448
- /**
1449
- * Returns the values of a multiselect sublist field on a selected line. One example of a multiselect sublist field is the Serial Numbers field on the Items sublist.
1450
- * @restriction This function is not supported in client SuiteScript. It is meant to be used in user event scripts.
1451
- *
1452
- * @param {string} type The sublist internal ID
1453
- * @param {string} fldnam The internal ID of the multiselect field
1454
- * @param {number} linenum The line number for this field. Note the first line number on a sublist is 1 (not 0).
1455
- */
1456
- getLineItemValues(type: string, fldnam: string, linenum: number): string[];
1457
- /**
1458
- * Return the number of columns for a matrix field.
1459
- *
1460
- * @param {string} group matrix sublist name
1461
- * @param {string} name matrix field name
1462
- */
1463
- getMatrixCount(group: string, name: string): number;
1464
- /**
1465
- * Return field metadata for field.
1466
- *
1467
- * @param {string} type matrix sublist name
1468
- * @param {string} fldnam matrix field name
1469
- * @param {number} linenum matrix column (1-based)
1470
- */
1471
- getMatrixField(type: string, fldnam: string, linenum: number): NLObjField;
1472
- /**
1473
- * Get the value of a matrix header field.
1474
- *
1475
- * @param {string} type matrix sublist name
1476
- * @param {string} name matrix field name
1477
- * @param {number} column matrix column index (1-based)
1478
- */
1479
- getMatrixValue(type: string, name: string, column: number): string;
1480
- /**
1481
- * Return the recordType corresponding to this record.
1482
- */
1483
- getRecordType(): string;
1484
- /**
1485
- * Insert a new line into a sublist.
1486
- *
1487
- * @param {string} group Sublist name.
1488
- * @param {number} line Line index at which to insert line.
1489
- */
1490
- insertLineItem(group: string, line?: number): void;
1491
- /**
1492
- * Returns a nlobjSubrecord object. Use this API to remove a subrecord from a sublist field on the parent record.
1493
- *
1494
- * @param {string} sublist The sublist internal ID on the parent record.
1495
- * @param {string} fldname The internal ID of the 'subrecord field' on the sublist of the parent record.
1496
- */
1497
- removeCurrentLineItemSubrecord(sublist: string, fldname: string): void;
1498
- /**
1499
- * Remove an existing line from a sublist.
1500
- *
1501
- * @param {string} group Sublist name.
1502
- * @param {number} line Line number to remove.
1503
- */
1504
- removeLineItem(group: string, line?: number): void;
1505
- /**
1506
- * Returns a nlobjSubrecord object. Use this API to remove a subrecord from a body field on the parent record.
1507
- *
1508
- * @param {string} fldname The internal ID of the 'subrecord field' on the body of the parent record.
1509
- */
1510
- removeSubrecord(fldname: string): NLObjRecord;
1511
- /**
1512
- * Select an existing line in a sublist.
1513
- *
1514
- * @param {string} group Sublist name.
1515
- * @param {number} line Line number to select.
1516
- */
1517
- selectLineItem(group: string, line: number): void;
1518
- /**
1519
- * Insert and select a new line in a sublist.
1520
- *
1521
- * @param {string} group sublist name
1522
- */
1523
- selectNewLineItem(group: string): void;
1524
- /**
1525
- * Set the current value of a sublist field.
1526
- * @param {string} group sublist name
1527
- * @param {string} name sublist field name
1528
- * @param {string} value sublist field value
1529
- * @param {string} timezone
1530
- */
1531
- setCurrentLineItemDateTimeValue(group: string, name: string, value: string, timezone?: string): void;
1532
- /**
1533
- * Set the current value of a sublist matrix field.
1534
- *
1535
- * @param {string} group matrix sublist name
1536
- * @param {string} name matrix field name
1537
- * @param {number} column matrix field column index (1-based)
1538
- * @param {string} value matrix field value
1539
- */
1540
- setCurrentLineItemMatrixValue(group: string, name: string, column: number, value: string): void;
1541
- /**
1542
- * Set the current text of a sublist field.
1543
- * @param {string} group sublist name
1544
- * @param {string} name sublist field name
1545
- * @param {string|number} value sublist field value
1546
- */
1547
- setCurrentLineItemText(group: string, name: string, value: string|number): void;
1548
- /**
1549
- * Set the current value of a sublist field.
1550
- * @param {string} group sublist name
1551
- * @param {string} name sublist field name
1552
- * @param {string|number} value sublist field value
1553
- */
1554
- setCurrentLineItemValue(group: string, name: string, value: string|number): void;
1555
- /**
1556
- * Set the value of a field.
1557
- *
1558
- * @param {string} name Field name.
1559
- * @param {string} value Field value.
1560
- * @param {string} timezone Olson value.
1561
- */
1562
- setDateTimeValue(name: string, value: string, timezone?: string): void;
1563
- /**
1564
- * Set the value (via display value) of a select field.
1565
- * @restriction only supported for select fields
1566
- *
1567
- * @param {string} name Field name
1568
- * @param {string} text Field display value
1569
- */
1570
- setFieldText(name: string, text: string): void;
1571
- /**
1572
- * Set the values (via display values) of a multi-select field.
1573
- * @restriction only supported for multi-select fields
1574
- *
1575
- * @param {string} name Field name
1576
- * @param {string[]} texts Array of field display values
1577
- */
1578
- setFieldTexts(name: string, texts: string[]): void;
1579
- /**
1580
- * Set the value of a field.
1581
- *
1582
- * @param {string} name Field name
1583
- * @param {string|number} value Field value
1584
- */
1585
- setFieldValue(name: string, value: string|number): void;
1586
- /**
1587
- * Set the values of a multi-select field.
1588
- *
1589
- * @param {string} name Field name
1590
- * @param {string[]} values String array containing field values
1591
- */
1592
- setFieldValues(name: string, values: string[]): void;
1593
- /**
1594
- * Set the value of a sublist field.
1595
- *
1596
- * @param {string} group Sublist name
1597
- * @param {string} name Sublist field name
1598
- * @param {number} line Line number (1-based)
1599
- * @param {string} value Datetime value
1600
- * @param {string} timezone Optional value
1601
- */
1602
- setLineItemDateTimeValue(group: string, name: string, line: number, value: string, timezone?: string): void;
1603
- /**
1604
- * Set the value of a sublist field.
1605
- *
1606
- * @param {string} group sublist name
1607
- * @param {string} name sublist field name
1608
- * @param {number|string} line line number (1-based)
1609
- * @param {string|number} value sublist field value
1610
- */
1611
- setLineItemValue(group: string, name: string, line: number|string, value: string|number): void;
1612
- /**
1613
- * Set the value of a matrix header field.
1614
- *
1615
- * @param {string} type matrix sublist name
1616
- * @param {string} name matrix field name
1617
- * @param {number} column matrix column index (1-based)
1618
- * @param {string} value field value
1619
- */
1620
- setMatrixValue(type: string, name: string, column: number, value: string): void;
1621
- /**
1622
- * Returns a nlobjSubrecord object. Use this API to view a subrecord from a sublist field on the parent record.
1623
- *
1624
- * @param {string} sublist The sublist internal ID on the parent record.
1625
- * @param {string} fldname The internal ID of the 'subrecord field' on the sublist of the parent record.
1626
- */
1627
- viewCurrentLineItemSubrecord(sublist: string, fldname: string): NLObjSubrecord;
1628
- /**
1629
- * Returns a nlobjSubrecord object. Use this API to view a subrecord from a sublist field on the parent record.
1630
- *
1631
- * @param {string} sublist The sublist internal ID on the parent record
1632
- * @param {string} fldname The internal ID of the 'subrecord field' on the sublist of the parent record
1633
- * @param {number} linenum The line number for the sublist field. Note the first line number on a sublist is 1 (not 0).
1634
- */
1635
- viewLineItemSubrecord(sublist: string, fldname: string, linenum: number): NLObjSubrecord;
1636
- /**
1637
- * Returns a nlobjSubrecord object. Use this API to view a subrecord from a body field on the parent record.
1638
- *
1639
- * @param {string} fldname The internal ID of the 'subrecord field' on the body of the parent record.
1640
- */
1641
- viewSubrecord(fldname: string): NLObjSubrecord;
1642
- }
1643
-
1644
- interface NLObjReportColumn {
1645
- /**
1646
- * Get the formula for this column.
1647
- */
1648
- getFormula(): string;
1649
- /**
1650
- * Get the parent reference of this column.
1651
- */
1652
- getParent(): NLObjReportColumnHierarchy;
1653
- /**
1654
- * Returns the measure flag.
1655
- */
1656
- isMeasure(): boolean;
1657
- }
1658
-
1659
- interface NLObjReportColumnHierarchy {
1660
- /**
1661
- * Get the children reference of this column hierarchy.
1662
- */
1663
- getChildren(): NLObjReportColumnHierarchy;
1664
- /**
1665
- * Get the parent reference of this column hierarchy.
1666
- */
1667
- getParent(): NLObjReportColumnHierarchy;
1668
- }
1669
-
1670
- interface NLObjReportDefinition {
1671
- /**
1672
- * Add a column to the report definition.
1673
- * @param {string} alias The column alias.
1674
- * @param {boolean} isMeasure A value of true means that the column is flagged as a measure.
1675
- * @param {string} label The column label that will be displayed on the report.
1676
- * @param {NLObjReportColumnHierarchy} parent The reference to the parent column in the hierarchy. If null, then this column will not be associated with a parent column.
1677
- * @param {string} format The data type that this column represents
1678
- * @param {string} formula A string which describes a mathematical formula in the format of 'F(x,y,z) = mathematical function', where x,y,z are previously defined aliases from addRowHierarchy, addColumnHierarchy, or addColumn calls.
1679
- */
1680
- addColumn(alias: string, isMeasure: boolean, label: string, parent?: NLObjReportColumnHierarchy, format?: string, formula?: string): NLObjReportColumn;
1681
- /**
1682
- * Add a column hierarchy to the report definition.
1683
- *
1684
- * @param {string} alias The column alias.
1685
- * @param {string} label The column label that will be displayed on the report.
1686
- * @param {NLObjReportColumnHierarchy} parent The reference of the parent column in the hierarchy. If null, then this column will be the root (top level) column.
1687
- * @param {string} format The data type that this column represents
1688
- *
1689
- * return {nlobjReportColumnHierarchy}
1690
- *
1691
- * @since 2012.2
1692
- */
1693
- addColumnHierarchy(alias: string, label: string, parent?: NLObjReportColumnHierarchy, format?: string): NLObjReportColumnHierarchy;
1694
- /**
1695
- * Add a row hierarchy to the report definition.
1696
- *
1697
- * @param {string} alias The row alias.
1698
- * @param {string} label The row label that will be displayed on the report.
1699
- * @param {string} format The data type that this row represents.
1700
- */
1701
- addRowHierarchy(alias: string, label: string, format: string): NLObjReportRowHierarchy;
1702
- /**
1703
- * Attaches a search as a data source to the report definition.
1704
- *
1705
- * @param {string} searchType The type of records to search.
1706
- * @param {string} id The internal id if you are using a saved search as a data source.
1707
- * @param {NLObjSearchFilter[]} filters The array of search filters.
1708
- * @param {NLObjSearchColumn[]} columns The array of search columns.
1709
- * @param {string} map The mapping of rows/columns of the search to the report.
1710
- */
1711
- addSearchDatasource(searchType: string, id?: string, filters?: NLObjSearchFilter[], columns?: NLObjSearchColumn[], map?: string): void;
1712
- /**
1713
- * Creates the form for rendering from the report definition.
1714
- *
1715
- * @param {NLObjReportForm} form The form object created with nlapiCreateReportForm.
1716
- */
1717
- executeReport(form: NLObjReportForm): NLObjPivotTableHandle;
1718
- /**
1719
- * Sets the title of the report definition.
1720
- *
1721
- * @param {string} title The name of the report definition.
1722
- */
1723
- setTitle(title?: string): NLObjPivotTableHandle;
1724
- }
1725
-
1726
- interface NLObjReportRowHierarchy {
1727
- /**
1728
- * Get the children reference of this column hierarchy.
1729
- */
1730
- getChildren(): NLObjReportRowHierarchy;
1731
- /**
1732
- * Get the parent reference of this column hierarchy.
1733
- */
1734
- getParent(): NLObjReportRowHierarchy;
1735
- }
1736
-
1737
- interface NLObjReportForm { }
1738
-
1739
- interface NLObjRequest {
1740
- /**
1741
- * Return an Object containing field names to file objects for all uploaded files.
1742
- */
1743
- getAllFiles(): Object;
1744
- /**
1745
- * Return an Object containing all the request headers and their values.
1746
- */
1747
- getAllHeaders(): Object;
1748
- /**
1749
- * Return an Object containing all the request parameters and their values.
1750
- */
1751
- getAllParameters(): Object;
1752
- /**
1753
- * Return the body of the POST request.
1754
- */
1755
- getBody(): string;
1756
- /**
1757
- * Return the value of an uploaded file.
1758
- * @param {string} id file field name
1759
- */
1760
- getFile(id: string): NLObjFile;
1761
- /**
1762
- * Return the value of a request header.
1763
- * @param {string} name
1764
- */
1765
- getHeader(name: string): string;
1766
- /**
1767
- * Return the number of lines in a sublist.
1768
- * @param {string} group sublist name
1769
- */
1770
- getLineItemCount(group: string): number;
1771
- /**
1772
- * Return the value of a sublist value.
1773
- * @param {string} group sublist name
1774
- * @param {string} name sublist field name
1775
- * @param {number} line sublist line number
1776
- */
1777
- getLineItemValue(group: string, name: string, line: number): string;
1778
- /**
1779
- * Return the METHOD of the request
1780
- */
1781
- getMethod(): string;
1782
- /**
1783
- * Return the value of a request parameter.
1784
- *
1785
- * @param {string} name parameter name
1786
- */
1787
- getParameter(name: string): string;
1788
- /**
1789
- * Return the values of a request parameter as an Array.
1790
- *
1791
- * @param {string} name parameter name
1792
- */
1793
- getParameterValues(name: string): string[];
1794
- /**
1795
- * Return the URL of the request
1796
- */
1797
- getURL(): string;
1798
- }
1799
-
1800
- /** Accessor to Http response made available to Suitelets. */
1801
- interface NLObjResponse {
1802
- /**
1803
- * Add a value for a response header.
1804
- * @param {string} name of header
1805
- * @param {string} value for header
1806
- */
1807
- addHeader(name: string, value: string): void;
1808
- /**
1809
- * Return an Array (Object?) of all response headers.
1810
- * @return {Object}
1811
- */
1812
- getAllHeaders(): Object;
1813
- /**
1814
- * Returns the body returned by the server. Only available in the return value of a call to nlapiRequestURL(url, postdata, headers, callback, httpMethod).
1815
- */
1816
- getBody(): string;
1817
- /**
1818
- * Returns the response code returned by the server. Only available in the return value of a call to nlapiRequestURL(url, postdata, headers, callback, httpMethod).
1819
- */
1820
- getCode(): string;
1821
- /**
1822
- * Returns the nlobjError thrown during request. Only available in the return value of call to nlapiRequestURL in Client SuiteScript.
1823
- */
1824
- getError(): NLObjError;
1825
- /**
1826
- * Return the value of a response header.
1827
- * @param {string} name of header
1828
- */
1829
- getHeader(name: string): string;
1830
- /**
1831
- * Return an Array of all response header values for a header
1832
- * @param {string} name of header
1833
- */
1834
- getHeaders(name: string): string[];
1835
- /**
1836
- * Generates, and renders, a PDF directly to a response. Use renderPDF to generate PDFs without first importing a file to the file cabinet. This method is useful if your script does not have NetSuite file cabinet permissions.
1837
- * @param {string} xmlString Content of your PDF, passed to renderPDF as a string.
1838
- */
1839
- renderPDF(xmlString: string): void;
1840
- /**
1841
- * Sets the redirect URL for the response. All URLs must be internal unless the Suitelet is being executed in an "Available without Login" context
1842
- * at which point it can use type "external" to specify an external url via the subtype arg.
1843
- *
1844
- * @param {string} type type specifier for URL: suitelet|tasklink|record|mediaitem|external
1845
- * @param {string} subtype subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid|url
1846
- * @param {string} id internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a
1847
- * @param {string} pageMode string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view)
1848
- * @param {Object} parameters Object used to specify additional URL parameters as name/value pairs
1849
- */
1850
- sendRedirect(type: string, subtype: string, id?: string, pageMode?: boolean, parameters?: Object): void;
1851
- /**
1852
- * Sets the content type for the response (and an optional filename for binary output).
1853
- *
1854
- * @param {string} type the file type i.e. plainText, word, pdf, html doc (see list of media item types)
1855
- * @param {string} filename the file name
1856
- * @param {string} disposition Content Disposition used for streaming attachments: inline|attachment
1857
- */
1858
- setContentType(type: string, filename?: string, disposition?: string): void;
1859
- /**
1860
- * Sets the character encoding for the response.
1861
- * @param {String} encoding
1862
- */
1863
- setEncoding(encoding: string): void;
1864
- /**
1865
- * Set the value of a response header.
1866
- * @param {string} name of header
1867
- * @param {string} value for header
1868
- */
1869
- setHeader(name: string, value: string): void;
1870
- /**
1871
- * Sets CDN caching for a shorter period of time or a longer period of time.
1872
- * @param {string} type Constant value to represent the caching duration: CACHE_DURATION_UNIQUE, CACHE_DURATION_SHORT, CACHE_DURATION_MEDIUM, CACHE_DURATION_LONG
1873
- */
1874
- setCDNCacheable(type: string): void;
1875
- /**
1876
- * Write information (text/xml/html) to the response.
1877
- *
1878
- * @param {string} output
1879
- */
1880
- write(output: string): void;
1881
- /**
1882
- * Write line information (text/xml/html) to the response.
1883
- *
1884
- * @param {string} output
1885
- */
1886
- writeLine(output: string): void;
1887
- /**
1888
- * Write a UI object page.
1889
- *
1890
- * @param {Object} pageobject Page UI object: nlobjList|nlobjAssistant|nlobjForm|nlobjDashboard
1891
- */
1892
- writePage(pageobject: Object): void;
1893
- }
1894
-
1895
- interface NLObjSearch {
1896
- /**
1897
- * Adds a single return column to the search. Note that existing columns on the search are not changed.
1898
- *
1899
- * @param {NLObjSearchColumn} column The nlobjSearchColumn you want added to the search.
1900
- */
1901
- addColumn(column: NLObjSearchColumn): void;
1902
- /**
1903
- * Adds multiple return columns to the search. Note that existing columns on the search are not changed.
1904
- *
1905
- * @param {NLObjSearchColumn[]} columns The nlobjSearchColumn[] you want added to the search.
1906
- */
1907
- addColumns(columns: NLObjSearchColumn[]): void;
1908
- /**
1909
- * Adds a single search filter. Note that existing filters on the search are not changed.
1910
- *
1911
- * @param {nlobjSearchFilter} filter The nlobjSearchFilter you want added to the search.
1912
- */
1913
- addFilter(filter: NLObjSearchFilter): void;
1914
- /**
1915
- * Adds a search filter list. Note that existing filters on the search are not changed.
1916
- *
1917
- * @param {nlobjSearchFilter[]} filters The nlobjSearchFilter[] you want added to the search.
1918
- */
1919
- addFilters(filters: NLObjSearchFilter[]): void;
1920
- /**
1921
- * Deletes a given saved search that was created through scripting or through the UI.
1922
- */
1923
- deleteSearch(): void;
1924
- /**
1925
- * Gets the search return columns for the search.
1926
- */
1927
- getColumns(): NLObjSearchColumn[];
1928
- /**
1929
- * Gets the filter expression for the search.
1930
- */
1931
- getFilterExpression(): any[];
1932
- /**
1933
- * Gets the filters for the search.
1934
- */
1935
- getFilters(): NLObjSearchFilter[];
1936
- /**
1937
- * Gets the internal ID of the search.
1938
- */
1939
- getId(): string;
1940
- /**
1941
- * Gets whether the nlobjSearch has been set as public search.
1942
- */
1943
- getIsPublic(): boolean;
1944
- /**
1945
- * Gets the script ID of the search.
1946
- */
1947
- getScriptId(): string;
1948
- /**
1949
- * Returns the record type that the search was based on. This method is helpful when you have the internal ID of the search, but do not know the record type the search was based on.
1950
- */
1951
- getSearchType(): string;
1952
- /**
1953
- * Runs an ad-hoc search, returning the results. Be aware that calling this method does NOT save the search.
1954
- */
1955
- runSearch(): NLObjSearchResultSet;
1956
- /**
1957
- * Saves the search created by nlapiCreateSearch(type, filters, columns).
1958
- * @param {string} title The title you want to give the saved search.
1959
- * @param {string} scriptId The script ID you want to assign to the saved search. All saved search script IDs must be prefixed with customsearch.
1960
- */
1961
- saveSearch(title?: string, scriptId?: string): number;
1962
- /**
1963
- * Sets the return columns for this search, overwriting any prior columns. If null is passed in it is treated as if it were an empty array and removes any existing columns on the search.
1964
- *
1965
- * @param {NLObjSearchColumn[]} columns The nlobjSearchColumn[] you want to set in the search. Passing in null or [] removes all columns from the search.
1966
- */
1967
- setColumns(columns: NLObjSearchColumn[]): void;
1968
- /**
1969
- * Sets the search filter expression, overwriting any prior filters. If null is passed in, it is treated as if it was an empty array and removes any existing filters on this search.
1970
- * @param {(string|string[])[]} filterExpression The filter expression you want to set in the search. Passing in null or [] removes all filters from the search.
1971
- */
1972
- setFilterExpression(filterExpression: (string|string[])[]): void;
1973
- /**
1974
- * Sets the search filter expression, overwriting any prior filters. If null is passed in, it is treated as if it was an empty array and removes any existing filters on this search.
1975
- *
1976
- * @param {Object[]} filterExpression The filter expression you want to set in the search. Passing in null or [] removes all filters from the search.
1977
- */
1978
- setFilters(filterExpression: any[]): void;
1979
- /**
1980
- * Sets whether the search is public or private. By default, all searches created through nlapiCreateSearch(type, filters, columns) are private.
1981
- *
1982
- * @param {boolean} value Set to true to designate the search as a public search. Set to false to designate the search as a private search.
1983
- */
1984
- setIsPublic(value: boolean): void;
1985
- /**
1986
- * Acts like nlapiSetRedirectURL(type, identifier, id, editmode, parameters) but redirects end users to a populated search definition page. You can use this method with any kind of search that is held in the nlobjSearch object.
1987
- *
1988
- * @restriction This method is supported in afterSubmit user event scripts, Suitelets, and client scripts.
1989
- */
1990
- setRedirectURLToSearch(): void;
1991
- /**
1992
- * Acts like nlapiSetRedirectURL(type, identifier, id, editmode, parameters) but redirects end users to a search results page. You can use this method with any kind of search that is held in the nlobjSearch object.
1993
- *
1994
- * @restriction This method is supported in afterSubmit user event scripts, Suitelets, and client scripts.
1995
- */
1996
- setRedirectURLToSearchResults(): void;
1997
- }
1998
-
1999
- /**
2000
- * Return a new instance of nlobjSearchColumn used for column objects used to define search return columns.
2001
- *
2002
- * @classDescription search column.
2003
- * @constructor
2004
- * @param {string} name column name.
2005
- * @param {string} join internal ID for joined search where this column is defined
2006
- * @param {string} summary
2007
- */
2008
- declare function nlobjSearchColumn(name: string, join?: string, summary?: string): void;
2009
- interface NLObjSearchColumn {
2010
- /**
2011
- * Return formula for this search column.
2012
- */
2013
- getFormula(): string;
2014
- /**
2015
- * The function used in this search column as a string.
2016
- */
2017
- getFunction(): string;
2018
- /**
2019
- * Return the join id for this search column.
2020
- */
2021
- getJoin(): string;
2022
- /**
2023
- * Return the label of this search column.
2024
- */
2025
- getLabel(): string;
2026
- /**
2027
- * Return the name of this search column.
2028
- */
2029
- getName(): string;
2030
- /**
2031
- * Returns the sort direction for this column.
2032
- */
2033
- getSort(): string;
2034
- /**
2035
- * Return the summary type (avg,group,sum,count) of this search column.
2036
- */
2037
- getSummary(): string;
2038
- /**
2039
- * Set the formula used for this column. Name of the column can either be formulatext, formulanumeric, formuladatetime, formulapercent, or formulacurrency.
2040
- *
2041
- * @param {string} formula The formula used for this column.
2042
- */
2043
- setFormula(formula: string): NLObjSearchColumn;
2044
- /**
2045
- * Sets the special function used for this column.
2046
- *
2047
- * @param {string} functionId Special function used for this column.
2048
- */
2049
- setFunction(functionId: string): NLObjSearchColumn;
2050
- /**
2051
- * Set the label used for this column.
2052
- *
2053
- * @param {string} label The label used for this column.
2054
- */
2055
- setLabel(label: string): NLObjSearchColumn;
2056
- /**
2057
- * Return nlobjSearchColumn sorted in either ascending or descending order.
2058
- *
2059
- * @param {boolean} sort If not set, defaults to false, which returns column data in ascending order.
2060
- */
2061
- setSort(sort: boolean): NLObjSearchColumn;
2062
- /**
2063
- * Returns the search column for which the minimal or maximal value should be found when returning the nlobjSearchColumn value.
2064
- *
2065
- * @param {string} name The name of the search column for which the minimal or maximal value should be found.
2066
- * @param {string} join The join id for this search column.
2067
- */
2068
- setWhenOrderBy(name: string, join: string): NLObjSearchColumn;
2069
- }
2070
-
2071
- /**
2072
- * Return a new instance of nlobjSearchFilter filter objects used to define search criteria.
2073
- *
2074
- * @classDescription search filter
2075
- * @constructor
2076
- * @param {string} name Filter name.
2077
- * @param {string} join Internal ID for joined search where this filter is defined
2078
- * @param {string} operator Operator name (i.e. anyOf, contains, lessThan, etc..)
2079
- * @param {string|string[]} value
2080
- * @param {string} value2
2081
- */
2082
- declare function nlobjSearchFilter(name: string, join: string, operator: string, value?: string|string[], value2?: string): void;
2083
- interface NLObjSearchFilter {
2084
- /**
2085
- * Returns the formula used for this filter.
2086
- */
2087
- getFormula(): string;
2088
- /**
2089
- * Return the join id for this search filter.
2090
- */
2091
- getJoin(): string;
2092
- /**
2093
- * Return the name of this search filter.
2094
- */
2095
- getName(): string;
2096
- /**
2097
- * Return the filter operator used.
2098
- */
2099
- getOperator(): string;
2100
- /**
2101
- * Returns the summary type used for this filter.
2102
- */
2103
- getSummaryType(): string;
2104
- /**
2105
- * Sets the formula used for this filter. Name of the filter can either be formulatext, formulanumeric, formuladatetime, formulapercent, or formulacurrency.
2106
- *
2107
- * @param {string} formula The formula used for this filter.
2108
- */
2109
- setFormula(formula: string): NLObjSearchFilter;
2110
- /**
2111
- * Sets the summary type used for this filter. Filter name must correspond to a search column if it is to be used as a summary filter.
2112
- *
2113
- * @param {string} type The summary type used for this filter.
2114
- */
2115
- setSummaryType(type: string): NLObjSearchFilter;
2116
- }
2117
-
2118
- interface NLObjSearchResult {
2119
- /**
2120
- * Return an array of all nlobjSearchColumn objects returned in this search.
2121
- */
2122
- getAllColumns(): NLObjSearchColumn[];
2123
- /**
2124
- * Return the internalId for the record returned in this row.
2125
- */
2126
- getId(): number;
2127
- /**
2128
- * Return the recordtype for the record returned in this row.
2129
- */
2130
- getRecordType(): string;
2131
- /**
2132
- * Return the value for this nlobjSearchColumn.
2133
- * @param {nlobjSearchColumn} column Search result column.
2134
- */
2135
- getValue(column: NLObjSearchColumn): string;
2136
- /**
2137
- * Return the value for a return column specified by name, join ID, and summary type.
2138
- * @param {string} name the name of the search column.
2139
- * @param {string} join the join ID for the search column.
2140
- * @param {string} summary summary type specified for this column.
2141
- */
2142
- getValue(name: string, join?: string, summary?: string): string;
2143
- /**
2144
- * Return the text value for this nlobjSearchColumn.
2145
- * @param {nlobjSearchColumn} column Search result column.
2146
- */
2147
- getText(column: NLObjSearchColumn): string;
2148
- /**
2149
- * Return the text value for a return column specified by name, join ID, and summary type.
2150
- * @param {string} name the name of the search column.
2151
- * @param {string} join the join ID for the search column.
2152
- * @param {string} summary summary type specified for this column.
2153
- */
2154
- getText(name: string, join?: string, summary?: string): string;
2155
- }
2156
-
2157
- interface NLObjSearchResultSet {
2158
- /**
2159
- * Calls the developer-defined callback function for every result in this set.
2160
- *
2161
- * @param {function} callback A JavaScript function. This may be defined as a separate named function, or it may be an anonymous inline function.
2162
- */
2163
- forEachResult(callback: (result: NLObjSearchResult) => boolean): void;
2164
- /**
2165
- * Returns a list of nlobjSearchColumn objects for this result set. This list contains one nlobjSearchColumn object for each result column in the nlobjSearchResult objects returned by this search.
2166
- */
2167
- getColumns(): NLObjSearchColumn[];
2168
- /**
2169
- * Retrieve a slice of the search result. The start parameter is the inclusive index of the first result to return. The end parameter is the exclusive index of the last result to return.
2170
- *
2171
- * @param {number} start The index number of the first result to return, inclusive.
2172
- * @param {number} end The index number of the last result to return, exclusive.
2173
- */
2174
- getResults(start: number, end: number): NLObjSearchResult[];
2175
- }
2176
-
2177
- interface NLObjSelectOption {
2178
- /**
2179
- * Return internal ID for select option
2180
- */
2181
- getId(): string;
2182
- /**
2183
- * Return display value for select option.
2184
- */
2185
- getText(): string;
2186
- }
2187
-
2188
- /** Contains the results of a server response to an outbound Http(s) call. */
2189
- interface NLObjServerResponse {
2190
- /**
2191
- * Return an Array of all headers returned.
2192
- */
2193
- getAllHeaders(): string[];
2194
- /**
2195
- * Return the response body returned.
2196
- */
2197
- getBody(): string;
2198
- /**
2199
- * Return the response code returned.
2200
- */
2201
- getCode(): number;
2202
- /**
2203
- * Return the Content-Type header in response.
2204
- */
2205
- getContentType(): string;
2206
- /**
2207
- * Return the nlobjError thrown via a client call to nlapiRequestURL.
2208
- */
2209
- getError(): NLObjError;
2210
- /**
2211
- * Return the value of a header returned.
2212
- * @param {string} name the name of the header to return
2213
- */
2214
- getHeader(name: string): string;
2215
- /**
2216
- * Return all the values of a header returned.
2217
- * @param {string} name the name of the header to return
2218
- */
2219
- getHeaders(name: string): string[];
2220
- }
2221
-
2222
- interface NLObjSubList {
2223
- /**
2224
- * Add a button to this sublist.
2225
- *
2226
- * @param {string} name button name
2227
- * @param {string} label button label
2228
- * @param {string} script button script (function name)
2229
- */
2230
- addButton(name: string, label: string, script: string): NLObjButton;
2231
- /**
2232
- * Add a field (column) to this sublist.
2233
- *
2234
- * @param {string} name Field name
2235
- * @param {string} type Field type
2236
- * @param {string} label Field label
2237
- * @param {string|number} source Script ID or internal ID for source list used for this select field
2238
- */
2239
- addField(name: string, type: string, label: string, source?: string|number): NLObjField;
2240
- /**
2241
- * Add "Mark All" and "Unmark All" buttons to this sublist of type "list".
2242
- */
2243
- addMarkAllButtons(): void;
2244
- /**
2245
- * Add "Refresh" button to sublists of type "staticlist" to support manual refreshing of the sublist (without entire page reloads) if it's contents are very volatile
2246
- */
2247
- addRefreshButton(): NLObjButton;
2248
- /**
2249
- * Return the number of lines in a sublist.
2250
- *
2251
- * @param {string} group sublist name
2252
- */
2253
- getLineItemCount(group: string): number;
2254
- /**
2255
- * Returns string value of a sublist field. Note that you cannot set default line item values when the line is not in edit mode.
2256
- *
2257
- * @param {string} group The sublist internal id
2258
- * @param {string} fldnam The internal ID of the field (line item) whose value is being returned
2259
- * @param {number} linenum The line number for this field. Note the first line number on a sublist is 1 (not 0).
2260
- */
2261
- getLineItemValue(group: string, fldnam: string, linenum: number): string;
2262
- /**
2263
- * Designates a particular column as the totalling column, which is used to calculate and display a running total for the sublist
2264
- *
2265
- * @param {string} field The internal ID name of the field on this sublist used to calculate running total
2266
- */
2267
- setAmountField(field: string): void;
2268
- /**
2269
- * Set the display type for this sublist: hidden|normal. This method is only supported on scripted or staticlist sublists via the UI Object API.
2270
- *
2271
- * @param {string} type
2272
- */
2273
- setDisplayType(type: string): void;
2274
- /**
2275
- * Set helper text for this sublist. This method is only supported on sublists via the UI Object API.
2276
- *
2277
- * @param {string} help
2278
- */
2279
- setHelpText(help: string): void;
2280
- /**
2281
- * Set the label for this sublist. This method is only supported on sublists via the UI Object API.
2282
- *
2283
- * @param {string} label
2284
- */
2285
- setLabel(label: string): void;
2286
- /**
2287
- * Set the value of a cell in this sublist.
2288
- *
2289
- * @param {string} field sublist field name
2290
- * @param {number} line line number (1-based)
2291
- * @param {string} value sublist value
2292
- */
2293
- setLineItemValue(field: string, line: number, value: string): void;
2294
- /**
2295
- * Set values for multiple lines (Array of nlobjSearchResults or name-value pair Arrays) in this sublist. Note that this method is only supported on scripted sublists via the UI Object API.
2296
- *
2297
- * @param {string[][]|NLObjSearchResult[]|Object} values
2298
- */
2299
- setLineItemValues(values: string[][]|NLObjSearchResult[]|Object): void;
2300
- /**
2301
- * Designate a field on sublist that must be unique across all lines (only supported on sublists of type inlineeditor, editor).
2302
- * @param {string} fldnam the name of a field on this sublist whose value must be unique across all lines
2303
- */
2304
- setUniqueField(fldnam: string): NLObjField;
2305
- }
2306
-
2307
- /** Primary object used to encapsulate a NetSuite subrecord. To create a subrecord, you must first create or load a parent record. You can then create or access a subrecord from a body field or from a sublist field on the parent record. */
2308
- interface NLObjSubrecord {
2309
- /** Cancel the current processing of the subrecord and revert subrecord data to the last committed change (submitted in the last commit() call). */
2310
- cancel(): void;
2311
- /** Commit the subrecord after you finish modifying it. */
2312
- commit(): void;
2313
- /**
2314
- * Commit the current line in a sublist.
2315
- *
2316
- * @param {string} group sublist name
2317
- */
2318
- commitLineItem(group: string): void;
2319
- /**
2320
- * Select an existing line in a sublist.
2321
- *
2322
- * @param {string} group Sublist name.
2323
- * @param {number} line Line number to select.
2324
- */
2325
- selectLineItem(group: string, line: number): void;
2326
- /**
2327
- * Insert and select a new line in a sublist.
2328
- *
2329
- * @param {string} group sublist name
2330
- */
2331
- selectNewLineItem(group: string): void;
2332
- /**
2333
- * Set the current value of a sublist field.
2334
- * @param {string} group sublist name
2335
- * @param {string} name sublist field name
2336
- * @param {string} value sublist field value
2337
- */
2338
- setCurrentLineItemValue(group: string, name: string, value: string): void;
2339
- /**
2340
- * Set the value of a field.
2341
- *
2342
- * @param {string} name Field name
2343
- * @param {string|number} value Field value
2344
- */
2345
- setFieldValue(name: string, value: string|number): void;
2346
- }
2347
-
2348
- interface NLObjTab {
2349
- /**
2350
- * Set helper text for this tab or subtab.
2351
- *
2352
- * @param {string} help Inline help text used for this tab or subtab.
2353
- */
2354
- setHelpText(help: string): NLObjTab;
2355
- /**
2356
- * Set the label for this tab or subtab.
2357
- *
2358
- * @param {string} label String used as label for this tab or subtab.
2359
- */
2360
- setLabel(label: string): NLObjTab;
2361
- }
2362
-
2363
- interface NLObjTemplateRenderer {
2364
- /**
2365
- * Binds nlobjRecord object to variable name used in template.
2366
- * @param {string} variable variable name that represents record
2367
- * @param {NLObjRecord} record NetSuite record
2368
- */
2369
- addRecord(variable: string, record: NLObjRecord): void;
2370
- /**
2371
- * Binds an nlobjSearchResult object to variable name used in template.
2372
- * @param {string} variable variable name that represents search result
2373
- * @param {NLObjSearchResult} searchResult NetSuite search result
2374
- */
2375
- addSearchResults(variable: string, searchResult: NLObjSearchResult): void;
2376
- /**
2377
- * Perform the merge and return an object containing email subject and body.
2378
- * @governance 20 units
2379
- * @return {object} pure javascript object with two properties: subject and body
2380
- */
2381
- merge(): { subject: string, body: string };
2382
- /**
2383
- * Render the output of the template engine into the response.
2384
- * @param {NLObjResponse} nlobjResponse
2385
- */
2386
- renderToResponse(nlobjResponse: NLObjResponse): void;
2387
- /**
2388
- * Returns template content interpreted by FreeMarker as XML string that can be passed to nlapiXMLToPDF(xmlString) to produce PDF output.
2389
- */
2390
- renderToString(): string;
2391
- /**
2392
- * Associate a custom record to the merger.
2393
- * @param {string} recordType type of the custom record
2394
- * @param {number} recordId ID of the record to be associated with the merger
2395
- */
2396
- setCustomRecord(recordType: string, recordId: number): void;
2397
- /**
2398
- * Associate an entity to the merger.
2399
- * @param {string} entityType Type of the entity (customer/contact/partner/vendor/employee)
2400
- * @param {number} entityId ID of the entity to be associated with the merger.
2401
- */
2402
- setEntity(entityType: string, entityId: number): void;
2403
- /**
2404
- * Associate a second entity (recipient) to the merger.
2405
- * @param {string} recipientType type of the entity (customer/contact/partner/vendor/employee)
2406
- * @param {number} recipientId ID of the entity to be associated with the merger
2407
- */
2408
- setRecipient(recipientType: string, recipientId: number): void;
2409
- /**
2410
- * Associate a support case to the merger.
2411
- * @param {number} caseId ID of the support case to be associated with the merger
2412
- */
2413
- setSupportCase(caseId: number): void;
2414
- /**
2415
- * Passes in raw string of template to be transformed by FreeMarker.
2416
- * @param {string} template raw string of template.
2417
- */
2418
- setTemplate(template: string): void;
2419
- /**
2420
- * Associate a transaction to the merger.
2421
- * @param {number} transactionId ID of the transaction to be associated with the merger
2422
- */
2423
- setTransaction(transactionId: number): void;
2424
- }
2425
-
2426
- interface Window {
2427
- /**
2428
- * Gets the value of a URL parameter (undocumented NetSuite method).
2429
- * @param {string} parameter The URL parameter to get the value of.
2430
- */
2431
- getParameter(parameter: string): string;
2432
- }
2433
-
2434
- /**
2435
- * Add days to a Date object and returns a new Date
2436
- *
2437
- * @param {date} d Date object used to calculate the new date
2438
- * @param {number} days The number of days to add to this date object.
2439
- */
2440
- declare function nlapiAddDays(d: Date, days: number): Date;
2441
- /**
2442
- * Add months to a Date object and returns a new Date.
2443
- *
2444
- * @param {date} d Date object used to calculate the new date
2445
- * @param {number} months The number of months to add to this date object.
2446
- */
2447
- declare function nlapiAddMonths(d: Date, months: number): Date;
2448
- /**
2449
- * Attach a single record to another with optional properties.
2450
- * @param {string} type1 The record type name being attached.
2451
- * @param {number|string} id1 The internal ID for the record being attached.
2452
- * @param {string} type2 The record type name being attached to.
2453
- * @param {number|string} id2 The internal ID for the record being attached to.
2454
- * @param {Object} properties Object containing name/value pairs used to configure attach operation.
2455
- */
2456
- declare function nlapiAttachRecord(type1: string, id1: number|string, type2: string, id2: number|string, properties?: Object): void;
2457
- /**
2458
- * Cancel any changes made on the currently selected line.
2459
- * @restriction Only supported for sublists of type inlineeditor and editor
2460
- *
2461
- * @param {string} type Sublist name.
2462
- */
2463
- declare function nlapiCancelLineItem(type: string): void;
2464
- /**
2465
- * Save changes made on the currently selected line to the sublist.
2466
- *
2467
- * @param {string} type Sublist name.
2468
- */
2469
- declare function nlapiCommitLineItem(type: string): void;
2470
- /**
2471
- * Return a new record using values from an existing record.
2472
- * @param {string} type The record type name.
2473
- * @param {number|string} id The internal ID of the record to copy.
2474
- * @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization.
2475
- */
2476
- declare function nlapiCopyRecord(type: string, id: number|string, initializeValues?: Object): NLObjRecord;
2477
- /**
2478
- * Return a new assistant page.
2479
- * @restriction Suitelets only
2480
- *
2481
- * @param {string} title Page title
2482
- * @param {boolean} hideHeader true to hide the page header (false by default)
2483
- */
2484
- declare function nlapiCreateAssistant(title: string, hideHeader?: boolean): NLObjAssistant;
2485
- /**
2486
- * Initializes a new record and returns an nlobjCSVImport object.
2487
- * @restriction Only supported for bundle installation scripts, scheduled scripts, and RESTlets.
2488
- */
2489
- declare function nlapiCreateCSVImport(): NLObjCSVImport;
2490
- /**
2491
- * Create a subrecord on a sublist field on the current record on a page.
2492
- * @restriction supported in client and user event scripts only.
2493
- * @param {string} type sublist name
2494
- * @param {string} fldnam sublist field name
2495
- */
2496
- declare function nlapiCreateCurrentLineItemSubrecord(type: string, fldnam: string): NLObjSubrecord;
2497
- /**
2498
- * Create an email merger used to assemble subject and body text of an email from a given
2499
- * FreeMarker template and a set of associated records.
2500
- * @restriction Server SuiteScript only
2501
- *
2502
- * @param {number} templateId Internal ID of the template
2503
- */
2504
- declare function nlapiCreateEmailMerger(templateId: number): NLObjEmailMerger;
2505
- /**
2506
- * Create an nlobjError object that can be used to abort script execution and configure error notification
2507
- *
2508
- * @param {string} code Error code
2509
- * @param {string} details Error description
2510
- * @param {boolean} suppressEmail If true then suppress the error notification emails from being sent out (false by default).
2511
- */
2512
- declare function nlapiCreateError(code: string, details: string, suppressEmail?: boolean): NLObjError;
2513
- /**
2514
- * Instantiate a file object (specifying the name, type, and contents which are base-64 encoded for binary types.)
2515
- * @restriction Server SuiteScript only
2516
- *
2517
- * @param {string} name File name
2518
- * @param {string} type File type i.e. plainText, htmlDoc, pdf, word (see documentation for the list of supported file types)
2519
- * @param {string} contents String containing file contents (must be base-64 encoded for binary types)
2520
- */
2521
- declare function nlapiCreateFile(name: string, type: string, contents: string): NLObjFile;
2522
- /**
2523
- * Return a new entry form page.
2524
- * @restriction Suitelets only
2525
- *
2526
- * @param {string} title Page title
2527
- * @param {boolean} hideHeader true to hide the page header (false by default)
2528
- */
2529
- declare function nlapiCreateForm(title: string, hideHeader?: boolean): NLObjForm;
2530
- /**
2531
- * Return a new list page.
2532
- * @restriction Suitelets only
2533
- *
2534
- * @param {string} title Page title
2535
- * @param {boolean} hideHeader true to hide the page header (false by default)
2536
- */
2537
- declare function nlapiCreateList(title: string, hideHeader?: boolean): NLObjList;
2538
- /**
2539
- * Instantiate a new nlobjRecord object containing all the default field data for that record type.
2540
- * @param {string} type The record type name.
2541
- * @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization.
2542
- */
2543
- declare function nlapiCreateRecord(type: string, initializeValues?: Object): NLObjRecord;
2544
- /**
2545
- * Creates an instance of a report definition object.
2546
- */
2547
- declare function nlapiCreateReportDefinition(): NLObjReportDefinition;
2548
- /**
2549
- * Creates an nlobjReportForm object to render the report definition.
2550
- *
2551
- * @param {string} title The title of the form
2552
- */
2553
- declare function nlapiCreateReportForm(title: string): NLObjReportForm;
2554
- /**
2555
- * Creates a new search.
2556
- *
2557
- * @param {string} type the record type you are searching
2558
- * @param {NLObjSearchFilter|NLObjSearchFilter[]|Object[]} filters A single nlobjSearchFilter object or an array of nlobjSearchFilter objects or a search filter expression
2559
- * @param {NLObjSearchColumn|NLObjSearchColumn[]} columns A single nlobjSearchColumn object or an array of nlobjSearchColumn objects.
2560
- */
2561
- declare function nlapiCreateSearch(type: string, filters?: NLObjSearchFilter|any[], columns?: NLObjSearchColumn|NLObjSearchColumn[]): NLObjSearch;
2562
- /**
2563
- * Create a subrecord on body field on the current record on a page.
2564
- * @restriction supported in client and user event scripts only.
2565
- * @param {string} fldnam body field name
2566
- */
2567
- declare function nlapiCreateSubrecord(fldnam: string): NLObjSubrecord;
2568
- /**
2569
- * Create a template renderer used to generate various outputs based on a template.
2570
- * @restriction Server SuiteScript only
2571
- * @governance 10 units
2572
- */
2573
- declare function nlapiCreateTemplateRenderer(): NLObjTemplateRenderer;
2574
- /**
2575
- * Convert a Date object into a String
2576
- *
2577
- * @param {date} d Date object being converted to a string.
2578
- * @param {string} formattype Format type to use: date|datetime|timeofday with date being the default.
2579
- */
2580
- declare function nlapiDateToString(d: Date, formattype?: string): string;
2581
- /**
2582
- * Delete a file from the file cabinet.
2583
- * @governance 20 units
2584
- * @restriction Server SuiteScript only
2585
- *
2586
- * @param {number} id Internal ID of file to be deleted
2587
- */
2588
- declare function nlapiDeleteFile(id: number): number;
2589
- /**
2590
- * Delete a record from the system.
2591
- * @param {string} type The record type name.
2592
- * @param {number|string} id The internal ID of the record to delete.
2593
- */
2594
- declare function nlapiDeleteRecord(type: string, id: number|string): void;
2595
- /**
2596
- * Detach a single record from another with optional properties.
2597
- * @param {string} type1 The record type name being attached.
2598
- * @param {number} id1 The internal ID for the record being attached.
2599
- * @param {string} type2 The record type name being attached to.
2600
- * @param {number} id2 The internal ID for the record being attached to.
2601
- * @param {Object} properties Object containing name/value pairs used to configure detach operation.
2602
- */
2603
- declare function nlapiDetachRecord(type1: string, id1: number, type2: string, id2: number, properties?: Object): void;
2604
- /**
2605
- * Sets the given field to disabled or enabled.
2606
- *
2607
- * @restriction supported in client scripts only
2608
- * @param {string} fldnam the internal ID name of the field to enable/disable
2609
- * @param {boolean} val if set to true, the field is disabled; if set to false, it is enabled.
2610
- */
2611
- declare function nlapiDisableField(fldnam: string, val: boolean): void;
2612
- /**
2613
- * Sets the given line item field of a sublist to disabled or enabled.
2614
- *
2615
- * @restriction supported in client scripts only
2616
- * @param {string} type The sublist internal ID
2617
- * @param {string} fldnam The name of the line item field to enable/disable
2618
- * @param {boolean} val If set to true, the field is disabled; if set to false, it is enabled
2619
- */
2620
- declare function nlapiDisableLineItemField(type: string, fldnam: string, val: boolean): void;
2621
- /**
2622
- * Edit a subrecord on a sublist field on the current record on a page.
2623
- * @restriction supported in client and user event scripts only.
2624
- * @param {string} type sublist name
2625
- * @param {string} fldnam sublist field name
2626
- */
2627
- declare function nlapiEditCurrentLineItemSubrecord(type: string, fldnam: string): NLObjSubrecord;
2628
- /**
2629
- * Edit a subrecord on body field on the current record on a page.
2630
- * @restriction supported in client and user event scripts only.
2631
- * @param {string} fldnam body field name
2632
- */
2633
- declare function nlapiEditSubrecord(fldnam: string): NLObjSubrecord;
2634
- /**
2635
- * Encrypt a String using a SHA-1 hash function.
2636
- *
2637
- * @param {string} s String to encrypt.
2638
- */
2639
- declare function nlapiEncrypt(s: string): string;
2640
- /**
2641
- * Escape a String for use in an XML document.
2642
- *
2643
- * @param {string} text String to escape
2644
- */
2645
- declare function nlapiEscapeXML(text: string): string;
2646
- /**
2647
- * Calculate exchange rate between two currencies as of today or an optional effective date.
2648
- * @governance 10 units
2649
- *
2650
- * @param {string|number} fromCurrency Internal ID or currency code of currency we are converting from.
2651
- * @param {string|number} toCurrency Internal ID or currency code of currency we are converting to.
2652
- * @param {string} date String containing date of effective exchange rate. defaults to today.
2653
- */
2654
- declare function nlapiExchangeRate(fromCurrency: string|number, toCurrency: string|number, date?: string): number | string;
2655
- /**
2656
- * Return the first line number that a matrix field value appears in.
2657
- *
2658
- * @param {string} type Sublist name
2659
- * @param {string} fldnam Matrix field name
2660
- * @param {number} column Matrix column index (1-based)
2661
- * @param {string} val The value being queried for in a matrix field
2662
- */
2663
- declare function nlapiFindLineItemMatrixValue(type: string, fldnam: string, column: number, val: string): number;
2664
- /**
2665
- * Return the first line number that a sublist field value appears in.
2666
- *
2667
- * @param {string} type Sublist name
2668
- * @param {string} fldnam Sublist field name
2669
- * @param {string} val The value being queried for in a sublist field
2670
- */
2671
- declare function nlapiFindLineItemValue(type: string, fldnam: string, val: string): number;
2672
- /**
2673
- * Format a number for data entry into a currency field.
2674
- *
2675
- * @param {string|number} str Numeric string used to format for display as currency using user's locale.
2676
- */
2677
- declare function nlapiFormatCurrency(str: string|number): string;
2678
- /**
2679
- * Return context information about the current user/script.
2680
- */
2681
- declare function nlapiGetContext(): NLObjContext;
2682
- /**
2683
- * Return the value of a field on the currently selected line.
2684
- *
2685
- * @param {string} type Sublist name
2686
- * @param {string} fldnam Sublist field name
2687
- * @param {string} timezone Timezone
2688
- */
2689
- declare function nlapiGetCurrentLineItemDateTimeValue(type: string, fldnam: string, timezone?: string): string;
2690
- /**
2691
- * Return the line number for the currently selected line.
2692
- *
2693
- * @param {string} type Sublist name
2694
- */
2695
- declare function nlapiGetCurrentLineItemIndex(type: string): number;
2696
- /**
2697
- * Return the label of a select field's current selection on the currently selected line.
2698
- *
2699
- * @param {string} type Sublist name
2700
- * @param {string} fldnam Sublist field name
2701
- */
2702
- declare function nlapiGetCurrentLineItemText(type: string, fldnam: string): string;
2703
- /**
2704
- * Return the value of a field on the currently selected line.
2705
- *
2706
- * @param {string} type Sublist name
2707
- * @param {string} fldnam Sublist field name
2708
- */
2709
- declare function nlapiGetCurrentLineItemValue(type: string, fldnam: string): string;
2710
- /**
2711
- * Returns the values of a multiselect sublist field on the currently selected line.
2712
- *
2713
- * @param {string} type The sublist internal ID.
2714
- * @param {string} fldnam The name of the multiselect field.
2715
- */
2716
- declare function nlapiGetCurrentLineItemValues(type: string, fldnam: string): string[];
2717
- /**
2718
- * Return the internal ID for the current user's department.
2719
- */
2720
- declare function nlapiGetDepartment(): number;
2721
- /**
2722
- * This API returns the value of a datetime field. If timeZone is passed in, the datetime value is converted to that time zone and then returned.
2723
- * If timeZone is not passed in, the datetime value is returned in the default time zone.
2724
- *
2725
- * @param {string} fieldId the internal field ID of a datetime field
2726
- * @param {string|number} timeZone One of values (string) or keys (int) from the Olson Values table
2727
- */
2728
- declare function nlapiGetDateTimeValue(fieldId: string, timeZone?: string|number): string;
2729
- /**
2730
- * Return field definition for a field.
2731
- * @param {string} fldnam The name of the field.
2732
- */
2733
- declare function nlapiGetField(fldnam: string): NLObjField;
2734
- /**
2735
- * Return the display value of a select field's current selection on the current record on a page.
2736
- * @param {string} fldnam The field name.
2737
- */
2738
- declare function nlapiGetFieldText(fldnam: string): string;
2739
- /**
2740
- * Return the values (via display text) of a multiselect field on the current record.
2741
- */
2742
- declare function nlapiGetFieldTexts(fldnam: string): string[];
2743
- /**
2744
- * Return the value of a field on the current record on a page.
2745
- * @param {string} fldnam The field name.
2746
- */
2747
- declare function nlapiGetFieldValue(fldnam: string): string;
2748
- /**
2749
- * Return the values of a multiselect field on the current record on a page.
2750
- * @param {string} fldnam The field name.
2751
- */
2752
- declare function nlapiGetFieldValues(fldnam: string): string[];
2753
- /**
2754
- * Returns a job manager instance.
2755
- *
2756
- * @param {string} jobType Aet to DUPLICATERECORDS
2757
- */
2758
- declare function nlapiGetJobManager(jobType: string): NLObjJobManager;
2759
- /**
2760
- * Return the value of a sublist field on the current record on a page.
2761
- * @restriction supported in client and user event scripts only.
2762
- * @param {string} type Sublist name
2763
- * @param {string} fldnam Sublist field name
2764
- * @param {int} linenum Line number (1-based)
2765
- * @param {string} timezone
2766
- */
2767
- declare function nlapiGetLineItemDateTimeValue(type: string, fldnam: string, linenum: number, timezone?: string): string;
2768
- /**
2769
- * Return the number of sublists in a sublist on the current record on a page.
2770
- * @restriction supported in client and user event scripts only.
2771
- *
2772
- * @param {string} type Sublist name
2773
- */
2774
- declare function nlapiGetLineItemCount(type: string): number;
2775
- /**
2776
- * Return field definition for a sublist field.
2777
- * @param {string} type Sublist name.
2778
- * @param {string} fldnam Sublist field name.
2779
- * @param {number} linenum Line number for sublist field (1-based) and only valid for sublists of type staticlist and list.
2780
- */
2781
- declare function nlapiGetLineItemField(type: string, fldnam: string, linenum?: number): NLObjField;
2782
- /**
2783
- * Return an nlobjField containing sublist field metadata.
2784
- * @param {string} type Matrix sublist name.
2785
- * @param {string} fldnam Matrix field name.
2786
- * @param {number} linenum Line number (1-based).
2787
- * @param {number} column Matrix column index (1-based).
2788
- */
2789
- declare function nlapiGetLineItemMatrixField(type: string, fldnam: string, linenum: number, column: number): NLObjField;
2790
- /**
2791
- * Return the value of a sublist matrix field on the current record on a page.
2792
- * @restriction supported in client and user event scripts only.
2793
- * @param {string} type Sublist name
2794
- * @param {string} fldnam Sublist field name
2795
- * @param {number} linenum Line number (1-based)
2796
- * @param {number} column Column index (1-based)
2797
- * @param {string} value
2798
- */
2799
- declare function nlapiGetLineItemMatrixValue(type: string, fldnam: string, linenum: number, column: number, value: string): string;
2800
- /**
2801
- * Return the label of a select field's current selection for a particular line.
2802
- *
2803
- * @param {string} type Sublist name
2804
- * @param {string} fldnam Sublist field name
2805
- * @param {int} linenum Line number (1-based)
2806
- */
2807
- declare function nlapiGetLineItemText(type: string, fldnam: string, linenum: number): string;
2808
- /**
2809
- * Return the value of a sublist field on the current record on a page.
2810
- * @restriction supported in client and user event scripts only.
2811
- * @param {string} type Sublist name
2812
- * @param {string} fldnam Sublist field name
2813
- * @param {number} linenum Line number (1-based)
2814
- */
2815
- declare function nlapiGetLineItemValue(type: string, fldnam: string, linenum: number): string;
2816
- /**
2817
- * Returns the values of a multiselect sublist field on a selected line.
2818
- *
2819
- * @param {string} type The sublist internal ID
2820
- * @param {string} fldnam The name of the multiselect field
2821
- * @param {number} linenum The line number for this field (1-based).
2822
- */
2823
- declare function nlapiGetLineItemValues(type: string, fldnam: string, linenum: number): string[];
2824
- /**
2825
- * Return the internal ID for the current user's location.
2826
- */
2827
- declare function nlapiGetLocation(): number;
2828
- /**
2829
- * Returns the NetSuite login credentials of currently logged-in user.
2830
- *
2831
- * @governance 10 units
2832
- * @restriction supported in user event, portlet, Suitelet, RESTlet and SSP scripts
2833
- */
2834
- declare function nlapiGetLogin(): NLObjLogin;
2835
- /**
2836
- * Return the number of columns for a matrix field.
2837
- *
2838
- * @param {string} type Sublist name
2839
- * @param {string} fldnam Matrix field name
2840
- */
2841
- declare function nlapiGetMatrixCount(type: string, fldnam: string): number;
2842
- /**
2843
- * Return field definition for a matrix field.
2844
- * @param {string} type Matrix sublist name.
2845
- * @param {string} fldnam Matrix field name.
2846
- * @param {number} column Matrix field column index (1-based).
2847
- */
2848
- declare function nlapiGetMatrixField(type: string, fldnam: string, column: number): NLObjField;
2849
- /**
2850
- * Get the value of a matrix header field
2851
- * @param {string} type Sublist name.
2852
- * @param {string} fldnam Sublist field name.
2853
- * @param {number} column Matrix column index (1-based).
2854
- */
2855
- declare function nlapiGetMatrixValue(type: string, fldnam: string, column: number): string;
2856
- /**
2857
- * Return an record object containing the data being submitted to the system for the current record.
2858
- * @restriction User Event scripts only
2859
- */
2860
- declare function nlapiGetNewRecord(): NLObjRecord;
2861
- /**
2862
- * Return an record object containing the current record's data prior to the write operation.
2863
- * @restriction beforeSubmit|afterSubmit User Event scripts only
2864
- */
2865
- declare function nlapiGetOldRecord(): NLObjRecord;
2866
- /**
2867
- * Return the internal ID corresponding to the current page or userevent script.
2868
- */
2869
- declare function nlapiGetRecordId(): number | string;
2870
- /**
2871
- * Return the recordtype corresponding to the current page or userevent script.
2872
- */
2873
- declare function nlapiGetRecordType(): string;
2874
- /**
2875
- * Return the internal ID for the current user's role. Returns 31 (Online Form User) when called from online forms or "Available without Login" Suitelets.
2876
- */
2877
- declare function nlapiGetRole(): number;
2878
- /**
2879
- * Return the internal ID for the current user's subsidiary.
2880
- */
2881
- declare function nlapiGetSubsidiary(): number;
2882
- /**
2883
- * Return the internal ID for the currently logged in user. Returns -4 when called from online forms or "Available without Login" Suitelets.
2884
- */
2885
- declare function nlapiGetUser(): number;
2886
- /**
2887
- * Initiates a workflow on-demand and returns the workflow instance ID for the workflow-record combination.
2888
- * @governance 20 units
2889
- *
2890
- * @param {string} recordtype Record type ID of the workflow base record.
2891
- * @param {number} id Internal ID of the base record.
2892
- * @param {string|number} workflowId Internal ID or script ID for the workflow definition.
2893
- */
2894
- declare function nlapiInitiateWorkflow(recordtype: string, id: number, workflowId: string|number): number;
2895
- /**
2896
- * Initiates a workflow on-demand and returns the workflow instance ID for the workflow-record combination.
2897
- * @governance 20 units
2898
- *
2899
- * @param {string} recordtype Record type ID of the workflow base record.
2900
- * @param {number} id Internal ID of the base record.
2901
- * @param {string|number} workflowId Internal ID or script ID for the workflow definition.
2902
- * @param {Object} parameters
2903
- */
2904
- declare function nlapiInitiateWorkflowAsync(recordtype: string, id: number, workflowId: string|number, parameters: Object): number;
2905
- /**
2906
- * Insert and select a new line into the sublist on a page or user event.
2907
- *
2908
- * @param {string} type Sublist name
2909
- * @param {number} line Line number at which to insert a new line.
2910
- */
2911
- declare function nlapiInsertLineItem(type: string, line?: number): void;
2912
- /**
2913
- * Adds a select option to a scripted select or multiselect sublist field.
2914
- * @restriction Client SuiteScript only
2915
- *
2916
- * @param {string} type Sublist name
2917
- * @param {string} fldnam Sublist field name
2918
- * @param {string} value Internal ID for select option
2919
- * @param {string} text Display text for select option
2920
- * @param {boolean} selected If true then option will be selected by default
2921
- */
2922
- declare function nlapiInsertLineItemOption(type: string, fldnam: string, value: string, text: string, selected?: boolean): void;
2923
- /**
2924
- * Adds a select option to a scripted select or multiselect field.
2925
- * @restriction Client SuiteScript only
2926
- *
2927
- * @param {string} fldnam Field name
2928
- * @param {string} value Internal ID for select option
2929
- * @param {string} text Display text for select option
2930
- * @param {boolean} selected If true then option will be selected by default
2931
- */
2932
- declare function nlapiInsertSelectOption(fldnam: string, value: string, text: string, selected?: boolean): void;
2933
- /**
2934
- * Returns true if any changes have been made to a sublist.
2935
- * @restriction Client SuiteScript only
2936
- *
2937
- * @param {string} type Sublist name
2938
- */
2939
- declare function nlapiIsLineItemChanged(type: string): boolean;
2940
- /**
2941
- * Loads a configuration record
2942
- * @restriction Server SuiteScript only
2943
- * @governance 10 units
2944
- *
2945
- * @param {string} type
2946
- */
2947
- declare function nlapiLoadConfiguration(type: string): NLObjConfiguration;
2948
- /**
2949
- * Load a file from the file cabinet (via its internal ID or path).
2950
- * @governance 10 units
2951
- * @restriction Server SuiteScript only
2952
- *
2953
- * @param {string|number} id Internal ID or relative path to file in the file cabinet (i.e. /SuiteScript/foo.js)
2954
- */
2955
- declare function nlapiLoadFile(id: string|number): NLObjFile;
2956
- /**
2957
- * Load an existing record from the system.
2958
- * @param {string} type The record type name.
2959
- * @param {number|string} id The internal ID of the record to copy.
2960
- * @param {Object} initializeValues Key-value pair of supported initial values.
2961
- */
2962
- declare function nlapiLoadRecord(type: string, id: number|string, initializeValues?: any): NLObjRecord;
2963
- /**
2964
- * Loads an existing saved search.
2965
- *
2966
- * @governance 5 units
2967
- * @param {string} type The record type you are searching.
2968
- * @param {string} id The internal ID or script ID of the saved search.
2969
- */
2970
- declare function nlapiLoadSearch(type: string, id: string): NLObjSearch;
2971
- /**
2972
- * Create an entry in the script execution log (note that execution log entries are automatically purged after 30 days).
2973
- *
2974
- * @param {'DEBUG' | 'AUDIT' | 'ERROR' | 'EMERGENCY' | 'debug' | 'audit' | 'error' | 'emergency'} type
2975
- * @param {string} title Log title (up to 90 characters supported)
2976
- * @param {string|number|boolean} details Log details (up to 3000 characters supported)
2977
- */
2978
- declare function nlapiLogExecution(type: 'DEBUG' | 'AUDIT' | 'ERROR' | 'EMERGENCY' | 'debug' | 'audit' | 'error' | 'emergency', title: string, details?: string|number|boolean): void;
2979
- /**
2980
- * Fetch the value of one or more fields on a record. This API uses search to look up the fields and is much
2981
- * faster than loading the record in order to get the field.
2982
- * @param {string} type The record type name.
2983
- * @param {number|string} id The internal ID for the record.
2984
- * @param {string|string[]} fields Field or fields to look up.
2985
- * @param {boolean} text If true then the display value is returned instead for select fields.
2986
- */
2987
- declare function nlapiLookupField(type: string, id: number|string, fields: string|string[], text?: boolean): string|Object;
2988
- /**
2989
- * Perform a mail merge operation using any template and up to 2 records and returns an nlobjFile with the results.
2990
- * @restriction only supported for record types that are available in mail merge: transactions, entities, custom records, and cases
2991
- * @restriction Server SuiteScript only
2992
- * @governance 10 units
2993
- *
2994
- * @param {number} id internal ID of template
2995
- * @param {string} baseType primary record type
2996
- * @param {number} baseId internal ID of primary record
2997
- * @param {string} altType secondary record type
2998
- * @param {number} altId internal ID of secondary record
2999
- * @param {Object} fields Object of merge field values to use in the mail merge (by default all field values are obtained from records) which overrides those from the record.
3000
- */
3001
- declare function nlapiMergeRecord(id: number, baseType: string, baseId: number, altType?: string, altId?: number, fields?: Object): NLObjFile;
3002
- /**
3003
- * This API is deprecated as of NetSuite Version 2008 Release 1.
3004
- *
3005
- * @param {number} id Internal ID of template
3006
- * @param {string} baseType Primary record type
3007
- * @param {number} baseId Internal ID of primary record
3008
- * @param {string} altType Secondary record type
3009
- * @param {number} altId Internal ID of secondary record
3010
- * @param {Object} fields Object of merge field values to use in the mail merge (by default all field values are obtained from records) which overrides those from the record.
3011
- *
3012
- * @deprecated
3013
- */
3014
- declare function nlapiMergeTemplate(id: number, baseType: string, baseId: number, altType?: string, altId?: number, fields?: Object): NLObjFile;
3015
- /**
3016
- * Return a URL with a generated OAuth token.
3017
- * @restriction Suitelets and Portlets only
3018
- * @governance 20 units
3019
- *
3020
- * @param {string} ssoAppKey
3021
- */
3022
- declare function nlapiOutboundSSO(ssoAppKey: string): string;
3023
- /**
3024
- * Print a record (transaction) given its type, id, and output format.
3025
- * @restriction Server SuiteScript only
3026
- * @governance 10 units
3027
- *
3028
- * @param {string} type Print output type: transaction|statement|packingslip|pickingticket
3029
- * @param {number} id Internal ID of record to print
3030
- * @param {string} format Output format: html|pdf|default
3031
- * @param {Object} properties Object of properties used to configure print
3032
- */
3033
- declare function nlapiPrintRecord(type: string, id: number, format?: string, properties?: Object): NLObjFile;
3034
- /**
3035
- * Refresh the sublist table.
3036
- * @restriction Only supported for sublists of type inlineeditor, editor, and staticlist
3037
- * @restriction Client SuiteScript only.
3038
- *
3039
- * @param {string} type Sublist name
3040
- */
3041
- declare function nlapiRefreshLineItems(type: string): void;
3042
- /**
3043
- * Causes a FORM type nlobjPortlet to immediately reload.
3044
- */
3045
- declare function nlapiRefreshPortlet(): void;
3046
- /**
3047
- * Remove a subrecord on a sublist field on the current record on a page.
3048
- * @restriction supported in client and user event scripts only.
3049
- * @param {string} type sublist name
3050
- * @param {string} fldnam sublist field name
3051
- */
3052
- declare function nlapiRemoveCurrentLineItemSubrecord(type: string, fldnam: string): void;
3053
- /**
3054
- * Remove the currently selected line from the sublist on a page or userevent.
3055
- *
3056
- * @param {string} type Sublist name
3057
- * @param {number} line Line number to remove (uses current row if null).
3058
- */
3059
- declare function nlapiRemoveLineItem(type: string, line?: number): void;
3060
- /**
3061
- * Removes a select option (or all if value is null) from a scripted select or multiselect sublist field.
3062
- * @restriction Client SuiteScript only
3063
- *
3064
- * @param {string} type Sublist name
3065
- * @param {string} fldnam Sublist field name
3066
- * @param {string} value Internal ID for select option to remove
3067
- */
3068
- declare function nlapiRemoveLineItemOption(type: string, fldnam: string, value: string): void;
3069
- /**
3070
- * Removes a select option (or all if value is null) from a scripted select or multiselect field.
3071
- * @restriction Client SuiteScript only
3072
- *
3073
- * @param {string} fldnam Field name
3074
- * @param {string} value Internal ID of select option to remove
3075
- */
3076
- declare function nlapiRemoveSelectOption(fldnam: string, value: string): void;
3077
- /**
3078
- * Remove a subrecord on body field on the current record on a page.
3079
- * @restriction supported in client and user event scripts only.
3080
- * @param {string} fldnam body field name
3081
- */
3082
- declare function nlapiRemoveSubrecord(fldnam: string): void;
3083
- /**
3084
- * Request a URL to an external or internal resource.
3085
- * @param {string} url A fully qualified URL to an HTTP(s) resource.
3086
- * @param {string|Object} postdata A string, document, or Object containing POST payload.
3087
- * @param {Object} headers Object containing request headers.
3088
- * @param {function} callback Available on the Client to support asynchronous requests. Function is passed an nlobjServerResponse with the results.
3089
- * @param {string} method HTTP method: GET, POST, PUT, DELETE, etc.
3090
- */
3091
- declare function nlapiRequestURL(url: string, postdata?: string|Object, headers?: Object, callback?: Function, method?: string): NLObjServerResponse;
3092
- /**
3093
- * Allows you to send credentials outside of NetSuite. This API securely accesses a handle to credentials that users specify in a NetSuite credential field.
3094
- * @param {string[]} credentials List of credential handles.
3095
- * @param {string} url A fully qualified URL to an HTTP(s) resource.
3096
- * @param {string|Object} postData A string, document, or Object containing POST payload.
3097
- * @param {Object} headers Object containing request headers.
3098
- * @param {string} method HTTP method: GET, POST, PUT, DELETE, etc.
3099
- */
3100
- declare function nlapiRequestURLWithCredentials(credentials: string[], url: string, postData: string|Object, headers: Object, method: string): NLObjServerResponse;
3101
- /**
3102
- * Causes a custom form portlet to be resized.
3103
- */
3104
- declare function nlapiResizePortlet(): void;
3105
- /**
3106
- * Resolve a URL to a resource or object in the system.
3107
- * @param {string} type Type specifier for URL: SUITELET|TASKLINK|RECORD|MEDIAITEM.
3108
- * @param {string} subtype Subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid.
3109
- * @param {string} id Internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a.
3110
- * @param {string|boolean} pageMode String specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view).
3111
- */
3112
- declare function nlapiResolveURL(type: string, subtype: string, id?: string, pageMode?: string|boolean): string;
3113
- /**
3114
- * Queue a scheduled script for immediate execution and return the status QUEUED if successful.
3115
- * @restriction Server SuiteScript only
3116
- * @governance 20 units
3117
- *
3118
- * @param {string|number} script Script ID or internal ID of scheduled script
3119
- * @param {string|number} deployment Script ID or internal ID of scheduled script deployment. If empty, the first "free" deployment (i.e. status = Not Scheduled or Completed) will be used
3120
- * @param {Object} parameters Object of parameter name->values used in this scheduled script instance
3121
- * @return {string} QUEUED or null if no available deployments were found or the current status of the deployment specified if it was not available.
3122
- */
3123
- declare function nlapiScheduleScript(script: string|number, deployment?: string|number, parameters?: Object): string;
3124
- /**
3125
- * Perform a duplicate record search using Duplicate Detection criteria.
3126
- * @param {string} type The recordType you are checking duplicates for (for example, customer|lead|prospect|partner|vendor|contact).
3127
- * @param {string[]} fields Array of field names used to detect duplicate (for example, companyname|email|name|phone|address1|city|state|zipcode).
3128
- * @param {number} id Internal ID of existing record. Depending on the use case, id may or may not be a required argument.
3129
- */
3130
- declare function nlapiSearchDuplicate(type: string, fields?: string[], id?: number): NLObjSearchResult[];
3131
- /**
3132
- * Perform a global record search across the system.
3133
- * @param {string} keywords Global search keywords string or expression.
3134
- */
3135
- declare function nlapiSearchGlobal(keywords: string): NLObjSearchResult[];
3136
- /**
3137
- * Perform a record search using an existing search or filters and columns.
3138
- * @param {string} type The Record Type Id.
3139
- * @param {number|string} id The internal ID or script ID for the saved search to use for search.
3140
- * @param {NLObjSearchFilter|NLObjSearchFilter[]} filters A single filter object or an array of filter objects.
3141
- * @param {NLObjSearchColumn|NLObjSearchColumn[]} columns A single column object or an array of column objects.
3142
- */
3143
- declare function nlapiSearchRecord(
3144
- type: string,
3145
- id?: number|string,
3146
- filters?: NLObjSearchFilter|any[],
3147
- columns?: NLObjSearchColumn|NLObjSearchColumn[]
3148
- ): NLObjSearchResult[];
3149
- /**
3150
- * Select an existing line in a sublist.
3151
- *
3152
- * @param {string} type Sublist name
3153
- * @param {number} linenum Line number to select
3154
- */
3155
- declare function nlapiSelectLineItem(type: string, linenum: number): void;
3156
- /**
3157
- * Select a new line in a sublist.
3158
- * @restriction Only supported for sublists of type inlineeditor and editor
3159
- *
3160
- * @param {string} type Sublist name
3161
- */
3162
- declare function nlapiSelectNewLineItem(type: string): void;
3163
- /**
3164
- * Select a node from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix)
3165
- *
3166
- * @param {Node} node node being queried
3167
- * @param {string} xpath string containing XPath expression.
3168
- */
3169
- declare function nlapiSelectNode(node: Node, xpath: string): Node;
3170
- /**
3171
- * Select an array of nodes from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix)
3172
- *
3173
- * @param {Node} node Node being queried
3174
- * @param {string} xpath string containing XPath expression.
3175
- */
3176
- declare function nlapiSelectNodes(node: Node, xpath: string): Node[];
3177
- /**
3178
- * Select a value from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix)
3179
- *
3180
- * @param {Node} node Node being queried
3181
- * @param {string} xpath String containing XPath expression.
3182
- */
3183
- declare function nlapiSelectValue(node: Node, xpath: string): string;
3184
- /**
3185
- * Select an array of values from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix)
3186
- *
3187
- * @param {Node} node Node being queried
3188
- * @param {string} xpath String containing XPath expression.
3189
- */
3190
- declare function nlapiSelectValues(node: Node, xpath: string): string[];
3191
- /**
3192
- * Sends a single on-demand campaign email to a specified recipient and returns a campaign response ID to track the email.
3193
- * @param {number} campaignEventId Internal ID of the campaign event.
3194
- * @param {number} recipientId Internal ID of the recipient - the recipient must have an email.
3195
- */
3196
- declare function nlapiSendCampaignEmail(campaignEventId: number, recipientId: number): number;
3197
- /**
3198
- * Send out an email and associate it with records in the system.
3199
- * Supported base types are entity for entities, transaction for transactions, activity for activities and cases, record|recordtype for custom records.
3200
- * @param {number|string} from Internal ID for employee user on behalf of whom this email is sent
3201
- * @param {string|number} to Email address or internal ID of user that this email is being sent to.
3202
- * @param {string} subject Email Subject.
3203
- * @param {string} body Email body.
3204
- * @param {string|string[]} cc Copy email address(es).
3205
- * @param {string|string[]} bcc Blind copy email address(es).
3206
- * @param {Object} records Object of base types -> internal IDs used to associate email to records. i.e. {entity: 100, record: 23, recordtype: customrecord_surveys}.
3207
- * @param {NLObjFile[]} files Array of nlobjFile objects (files) to include as attachments.
3208
- * @param {boolean} notifySenderOnBounce Controls whether or not the sender will receive email notification of bounced emails (defaults to false).
3209
- * @param {boolean} internalOnly Controls or not the resultingMessage record will be visible to non-employees on the Communication tab of attached records (defaults to false).
3210
- * @param {string} replyTo Email reply-to address.
3211
- */
3212
- declare function nlapiSendEmail(
3213
- from: number|string,
3214
- to: string|number|string[], // NOTE: The help file says that the options are string | int, but the documentation also notes that string[] is valid.
3215
- subject: string,
3216
- body: string,
3217
- cc?: string|string[],
3218
- bcc?: string|string[],
3219
- records?: Object,
3220
- files?: NLObjFile[],
3221
- notifySenderOnBounce?: boolean,
3222
- internalOnly?: boolean,
3223
- replyTo?: string
3224
- ): void;
3225
- /**
3226
- * Send out a fax and associate it with records in the system. This requires fax preferences to be configured.
3227
- * @param {number} from Internal ID for employee user on behalf of whom this fax is sent.
3228
- * @param {number|string} to Fax address or internal ID of user that this fax is being sent to.
3229
- * @param {string} subject Fax subject.
3230
- * @param {string} body Fax body.
3231
- * @param {Object} records Object of base types -> internal IDs used to associate fax to records. i.e. {entity: 100, record: 23, recordtype: customrecord_surveys}.
3232
- * @param {NLObjFile[]} files Array of nlObjFile objects (files) to include as attachments.
3233
- */
3234
- declare function nlapiSendFax(from: number, to: string|number, subject: string, body: string, records?: Object, files?: NLObjFile[]): void;
3235
- /**
3236
- * Set the value of a field on the currently selected line.
3237
- * @restriction synchronous arg is only supported in client SuiteScript
3238
- *
3239
- * @param {string} type Sublist name
3240
- * @param {string} fldnam Sublist field name
3241
- * @param {string} value Field value
3242
- * @param {string} timezone Timezone
3243
- */
3244
- declare function nlapiSetCurrentLineItemDateTimeValue(type: string,fldnam: string, value: string, timezone?: string): void;
3245
- /**
3246
- * Set the current value of a sublist field on the current record on a page.
3247
- * @restriction supported in client and user event scripts only.
3248
- * @restriction synchronous arg is only supported in Client SuiteScript
3249
- *
3250
- * @param {string} type Sublist name
3251
- * @param {string} fldnam Sublist field name
3252
- * @param {number} column Matrix column index (1-based)
3253
- * @param {string} value Matrix field value
3254
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true)
3255
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3256
- */
3257
- declare function nlapiSetCurrentLineItemMatrixValue(type: string, fldnam: string, column: number, value: string, fireFieldChanged?: boolean, synchronous?: boolean): void;
3258
- /**
3259
- * Set the value of a field on the currently selected line using it's label.
3260
- * @restriction synchronous arg is only supported in client SuiteScript
3261
- *
3262
- * @param {string} type Sublist name
3263
- * @param {string} fldnam Sublist field name
3264
- * @param {string} txt String containing display value or search text.
3265
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true)
3266
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3267
- */
3268
- declare function nlapiSetCurrentLineItemText(type: string, fldnam: string, txt: string, fireFieldChanged?: boolean, synchronous?: boolean): void;
3269
- /**
3270
- * Set the value of a field on the currently selected line.
3271
- * @restriction synchronous arg is only supported in client SuiteScript
3272
- *
3273
- * @param {string} type Sublist name
3274
- * @param {string} fldnam Sublist field name
3275
- * @param {string|number} value Field value
3276
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true)
3277
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3278
- */
3279
- declare function nlapiSetCurrentLineItemValue(type: string, fldnam: string, value: string|number, fireFieldChanged?: boolean, synchronous?: boolean): void;
3280
- /**
3281
- * Set the value of a multi-select field on the currently selected line.
3282
- * @restriction synchronous arg is only supported in client SuiteScript
3283
- *
3284
- * @param {string} type Sublist name
3285
- * @param {string} fldnam sublist field name
3286
- * @param {string[]} values Field values
3287
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true)
3288
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3289
- */
3290
- declare function nlapiSetCurrentLineItemValues(type: string, fldnam: string, values: string[], fireFieldChanged?: boolean, synchronous?: boolean): void;
3291
- /**
3292
- * Set the values of a date/time field.
3293
- *
3294
- * @param {string} fieldId the internal field ID of a datetime field
3295
- * @param {string} value The date and time in format mm/dd/yyyy hh:mm:ss am|pm
3296
- * @param {string|number} [timeZone] One of values (string) or keys (int) from the Olson Values table.
3297
- */
3298
- declare function nlapiSetDateTimeValue(fieldId: string, value: string, timeZone?: string|number): void;
3299
- /**
3300
- * Set whether or not a field is displayed. This function is not documented but still works as of 2017.1.
3301
- * @param fieldId
3302
- * @param show
3303
- */
3304
- declare function nlapiSetFieldDisplay(fieldId: string, show: boolean): void;
3305
- /**
3306
- * Set the value of a field on the current record on a page using it's label.
3307
- * @param {string} fldnam The field name.
3308
- * @param {string} txt Display name used to lookup field value.
3309
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true).
3310
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3311
- */
3312
- declare function nlapiSetFieldText(fldnam: string, txt: string, fireFieldChanged?: boolean, synchronous?: boolean): void;
3313
- /**
3314
- * Set the values (via display text) of a multiselect field on the current record on a page.
3315
- * @param {string} fldnam The field name.
3316
- * @param {string[]} texts Array of strings containing display values for field.
3317
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true).
3318
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3319
- */
3320
- declare function nlapiSetFieldTexts(fldnam: string, texts: string[], fireFieldChanged?: boolean, synchronous?: boolean): void;
3321
- /**
3322
- * Set the value of a field on the current record on a page.
3323
- * @param {string} fldnam The field name.
3324
- * @param {string|number} value Value used to set field.
3325
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true).
3326
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3327
- */
3328
- declare function nlapiSetFieldValue(fldnam: string, value: string|number, fireFieldChanged?: boolean, synchronous?: boolean): void;
3329
- /**
3330
- * Set the values of a multiselect field on the current record on a page.
3331
- * @param {string} fldnam The field name.
3332
- * @param {string[]} values Array of strings containing values for field.
3333
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true).
3334
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3335
- */
3336
- declare function nlapiSetFieldValues(fldnam: string, values: string[], fireFieldChanged?: boolean, synchronous?: boolean): void;
3337
- /**
3338
- * Set the value of a sublist field on the current record on a page.
3339
- * @restriction supported in client and user event scripts only.
3340
- * @param {string} type Sublist name
3341
- * @param {string} fldnam Sublist field name
3342
- * @param {number} linenum Line number (1-based)
3343
- * @param {string} datetime Date/Time value
3344
- * @param {string} timezone Timezone
3345
- */
3346
- declare function nlapiSetLineItemDateTimeValue(type: string, fldnam: string, linenum: number, datetime: string, timezone?: string): void;
3347
- /**
3348
- * Undocumented function that disables a line item column. Best used in lineInit().
3349
- * @param {string} type Sublist Id.
3350
- * @param {string} fldnam Column Id.
3351
- * @param {boolean} val True to disable, false to enable.
3352
- * @param {number} linenum
3353
- */
3354
- declare function nlapiSetLineItemDisabled(type: string, fldnam: string, val: boolean, linenum?: number): void;
3355
- /**
3356
- * Set the value of a sublist field on the current record on a page.
3357
- * @restriction supported in client and user event scripts only.
3358
- * @param {string} type Sublist name
3359
- * @param {string} fldnam Sublist field name
3360
- * @param {number} linenum Line number (1-based)
3361
- * @param {string|number} value
3362
- */
3363
- declare function nlapiSetLineItemValue(type: string, fldnam: string, linenum: number, value: string|number): void;
3364
- /**
3365
- * Set the value of a matrix header field.
3366
- * @restriction synchronous arg is only supported in client SuiteScript
3367
- *
3368
- * @param {string} type Sublist name.
3369
- * @param {string} fldnam Sublist field name.
3370
- * @param {number} column Matrix column index (1-based).
3371
- * @param {string} value Field value for matrix field.
3372
- * @param {boolean} fireFieldChanged If false then the field change event is suppressed (defaults to true).
3373
- * @param {boolean} synchronous If true then sourcing and field change execution happens synchronously (defaults to false).
3374
- * @return {void}
3375
- *
3376
- * @since 2009.2
3377
- */
3378
- declare function nlapiSetMatrixValue(type: string, fldnam: string, column: number, value: string, fireFieldChanged?: boolean, synchronous?: boolean): void;
3379
- /**
3380
- * Creates a recovery point saving the state of the script's execution.
3381
- */
3382
- declare function nlapiSetRecoveryPoint(): Object;
3383
- /**
3384
- *
3385
- * @param {string} type Type specifier for URL: suitelet|tasklink|record|mediaitem
3386
- * @param {string} subtype Subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid
3387
- * @param {string|number} id Internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a
3388
- * @param {boolean} editMode For RECORD calls, this determines whether to return a URL for the record in edit mode or view mode. If set to true, returns the URL to an existing record in edit mode.
3389
- * @param {Object} parameters Additional URL parameters as name/value pairs
3390
- */
3391
- declare function nlapiSetRedirectURL(type: string, subtype: string, id?: string|number, editMode?: boolean, parameters?: Object): void;
3392
- /**
3393
- * Convert a String into a Date object.
3394
- *
3395
- * @param {string} str Date string in the user's date format, timeofday format, or datetime format.
3396
- * @param {string} format Format type to use: date|datetime|timeofday with date being the default.
3397
- */
3398
- declare function nlapiStringToDate(str: string, format?: string): Date;
3399
- /**
3400
- * Convert a String into an XML document. Note that in Server SuiteScript XML is supported natively by the JS runtime using the e4x standard (http://en.wikipedia.org/wiki/E4X)
3401
- * This makes scripting XML simpler and more efficient
3402
- *
3403
- * @param {string} str String being parsed into an XML document
3404
- */
3405
- declare function nlapiStringToXML(str: string): XMLDocument;
3406
- /**
3407
- * Commits all changes to a configuration record.
3408
- * @restriction Server SuiteScript only
3409
- * @governance 10 units
3410
- *
3411
- * @param {NLObjConfiguration} setup Record
3412
- */
3413
- declare function nlapiSubmitConfiguration(setup: NLObjConfiguration): void;
3414
- /**
3415
- * Submits a CSV import job to asynchronously import record data into NetSuite.
3416
- *
3417
- * @param {NLObjCSVImport} csvImport
3418
- */
3419
- declare function nlapiSubmitCSVImport(csvImport: NLObjCSVImport): string;
3420
- /**
3421
- * Submit the values of a field or set of fields for an existing record.
3422
- * @param {string} type The record type name.
3423
- * @param {number|string} id The internal ID for the record.
3424
- * @param {string|string[]} fields Field or fields being updated.
3425
- * @param {number|string|string[]} values Field value or field values for updating.
3426
- * @param {boolean} doSourcing If not set, this argument defaults to false and field sourcing does not occur.
3427
- */
3428
- declare function nlapiSubmitField(type: string, id: number|string, fields: string|string[], values: number|string|string[], doSourcing?: boolean): void;
3429
- /**
3430
- * Add/update a file in the file cabinet.
3431
- * @governance 20 units
3432
- * @restriction Server SuiteScript only
3433
- *
3434
- * @param {NLObjFile} file A file object to submit
3435
- */
3436
- declare function nlapiSubmitFile(file: NLObjFile): number;
3437
- /**
3438
- * Submit a record to the system for creation or update.
3439
- * @param {NLObjRecord} record Record object containing the data record.
3440
- * @param {boolean} doSourcing If not set, defaults to false.
3441
- * @param {boolean} ignoreMandatoryFields Disables mandatory field validation for this submit operation.
3442
- */
3443
- declare function nlapiSubmitRecord(record: NLObjRecord, doSourcing?: boolean, ignoreMandatoryFields?: boolean): string;
3444
- /**
3445
- * Create a new record using values from an existing record of a different type.
3446
- * @param {string} type The record type name to transform from.
3447
- * @param {string|number} id The internal ID for the record.
3448
- * @param {string} transformType The recordType you are transforming the existing record into.
3449
- * @param {Object} transformValues An object containing transform default option/value pairs used to pre-configure transformed record.
3450
- */
3451
- declare function nlapiTransformRecord(type: string, id: string|number, transformType: string, transformValues?: Object): NLObjRecord;
3452
- /**
3453
- * Triggers a workflow on a record.
3454
- * @governance 20 units
3455
- *
3456
- * @param {string} recordtype Record type ID of the workflow base record
3457
- * @param {number} id Internal ID of the base record
3458
- * @param {string|number} workflowId Internal ID or script ID for the workflow definition
3459
- * @param {string|number} actionId Internal ID or script ID of the action script
3460
- * @param {string|number} stateId Internal ID or script ID of the state contains the referenced add button action
3461
- */
3462
- declare function nlapiTriggerWorkflow(recordtype: string, id: number, workflowId: string|number, actionId?: string|number, stateId?: string|number): number;
3463
- /**
3464
- * Validate that a given XML document conforms to a given XML schema. XML Schema Definition (XSD) is the expected schema format.
3465
- *
3466
- * @param {XMLDocument} xmlDocument xml to validate
3467
- * @param {XMLDocument} schemaDocument schema to enforce
3468
- * @param {string} schemaFolderId if your schema utilizes <import> or <include> tags which refer to sub-schemas by file name (as opposed to URL),
3469
- * provide the Internal Id of File Cabinet folder containing these sub-schemas as the schemaFolderId argument
3470
- * @throws {nlobjError} error containing validation failure message(s) - limited to first 10
3471
- */
3472
- declare function nlapiValidateXML(xmlDocument: XMLDocument, schemaDocument: XMLDocument, schemaFolderId: string): void;
3473
- /**
3474
- * View a subrecord on a sublist field on the current record on a page.
3475
- * @restriction supported in client and user event scripts only.
3476
- * @param {string} type sublist name
3477
- * @param {string} fldnam sublist field name
3478
- */
3479
- declare function nlapiViewCurrentLineItemSubrecord(type: string, fldnam: string): NLObjSubrecord;
3480
- /**
3481
- * View a subrecord on a sublist field on the current record on a page.
3482
- * @restriction supported in client and user event scripts only.
3483
- * @param {string} type sublist name
3484
- * @param {string} fldnam sublist field name
3485
- * @param {number} linenum
3486
- */
3487
- declare function nlapiViewLineItemSubrecord(type: string, fldnam: string, linenum: number): NLObjSubrecord;
3488
- /**
3489
- * view a subrecord on body field on the current record on a page.
3490
- * @restriction supported in client and user event scripts only.
3491
- * @param {string} fldname Body field name.
3492
- */
3493
- declare function nlapiViewSubrecord(fldname: string): NLObjSubrecord;
3494
- /**
3495
- * Void a transaction based on type and id.
3496
- * @param {string} type The transaction type name.
3497
- * @param {string} id The internal ID for the record.
3498
- * @return {string} If accounting preference is reversing journal, then it is new journal id, otherwise, it is the input record id.
3499
- */
3500
- declare function nlapiVoidTransaction(type: string, id: string): string;
3501
- /**
3502
- * Generate a PDF from XML using the BFO report writer (see http://big.faceless.org/products/report/).
3503
- * @restriction Server SuiteScript only
3504
- * @governance 10 units
3505
- *
3506
- * @param {string} input String containing BFO compliant XHTML
3507
- */
3508
- declare function nlapiXMLToPDF(input: string): NLObjFile;
3509
- /**
3510
- * Convert an XML document into a String. Note that in Server SuiteScript XML is supported natively by the JS runtime using the e4x standard (http://en.wikipedia.org/wiki/E4X)
3511
- * This makes scripting XML data simpler and more efficient
3512
- *
3513
- * @param {XMLDocument} xml Document being serialized into a string
3514
- */
3515
- declare function nlapiXMLToString(xml: XMLDocument): string;
3516
- /**
3517
- * Creates a recovery point and then reschedules the script.
3518
- */
3519
- declare function nlapiYieldScript(): Object;
3520
- /**
3521
- * Client method to submit the current record (undocumented NetSuite method).
3522
- * @param {string} name The name of the save button to trigger.
3523
- * @param {boolean} arg2 Not really sure what this parameter is used for.
3524
- */
3525
- declare function NLDoMainFormButtonAction(name: string, arg2: boolean): void;