-
Notifications
You must be signed in to change notification settings - Fork 8
/
subrecord.js
158 lines (145 loc) · 4.8 KB
/
subrecord.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/**
* SuiteScript Subrecord APIs
*
* The subrecord APIs that contain “LineItem” are for creating and working with subrecords from a sublist field
* on the parent record. The APIs that do not have “LineItem” in the name are for creating and working
* with subrecords from a body field on the parent record.
*
* Note that most of the functions listed below return an nlobjSubrecord object. After creating or editing a subrecord,
* you must save your changes using the nlobjSubrecord.commit() method. You must then save the subrecord’s parent
* record using nlapiSubmitRecord(record, doSourcing, ignoreMandatoryFields). If you do not commit both the subrecord
* and the parent record, all changes to the subrecord are lost.
*
* Important: Subrecords are used in the context of the Advanced Bin / Numbered Inventory Management feature.
* Currently, the only supported subrecord in NetSuite is the Inventory Details subrecord.
*/
/**
* Create a subrecord on body field on the current record on a page
*
* @restriction supported in client and user event scripts only
*
* @param {string} fieldName body field name
*
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiCreateSubrecord(fieldName) {
}
/**
* Edit a subrecord on body field on the current record on a page
*
* @restriction supported in client and user event scripts only
*
* @param {string} fieldName body field name
*
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiEditSubrecord(fieldName) {
}
/**
* Remove a subrecord on body field on the current record on a page
*
* @restriction supported in client and user event scripts only
*
* @param {string} fieldName body field name
*
* @return {void}
* @since 2011.2
*/
function nlapiRemoveSubrecord(fieldName) {
}
/**
* view a subrecord on body field on the current record on a page
* @restriction supported in client and user event scripts only
* @param {string} fieldName body field name
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiViewSubrecord(fieldName) {
}
/**
* Create a subrecord on a sublist field on the current record on a page
* @restriction supported in client and user event scripts only
* @param {string} type sublist name
* @param {string} fieldName sublist field name
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiCreateCurrentLineSubrecord(type, fieldName) {
}
/**
* view a subrecord on a sublist field on the current record on a page
* @restriction supported in client and user event scripts only
* @param {string} type sublist name
* @param {string} fieldName sublist field name
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiViewCurrentLineItemSubrecord(type, fieldName) {
}
/**
* Edit a subrecord on a sublist field on the current record on a page
* @restriction supported in client and user event scripts only
* @param {string} type sublist name
* @param {string} fieldName sublist field name
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiEditCurrentLineItemSubrecord(type, fieldName) {
}
/**
* Remove a subrecord on a sublist field on the current record on a page
* @restriction supported in client and user event scripts only
* @param {string} type sublist name
* @param {string} fieldName sublist field name
* @return {void}
* @since 2011.2
*/
function nlapiRemoveCurrentLineItemSubrecord(type, fieldName) {
}
/**
* view a subrecord on a sublist field on the current record on a page
* @restriction supported in client and user event scripts only
* @param {string} type sublist name
* @param {string} fieldName sublist field name
* @param {int} linenum line number (1-based)
* @return {nlobjSubrecord}
* @since 2011.2
*/
function nlapiViewLineItemSubrecord(type, fieldName, linenum) {
}
/**
* 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
*
* Important: Subrecords are currently supported only in the context of the new Advanced Bin / Numbered Inventory
* Management feature
*/
function nlobjSubrecord() {
}
/**
* Commit the subrecord after you finish modifying it
*
* @return {void}
* @since 2008.1
*/
nlobjSubrecord.prototype.commit = function() {
};
/**
* Cancel the any modification on subrecord
*
* Use this method to cancel the current processing of the subrecord and revert subrecord data to
* the last committed change (submitted in the last commit() call)
*
* Note that you will not be able to do any additional write or read operations on the subrecord
* Instance after you have canceled it. You must reload the subrecord from the parent to write any
* Additional data to the subrecord
*
* @return {void}
* @since 2008.1
*/
nlobjSubrecord.prototype.cancel = function() {
};