This topic contains 2 replies, has 0 voices, and was last updated by chanarbon 7 years, 2 months ago.
-
AuthorPosts
-
August 23, 2017 at 6:15 am #18217
Vesku1980Hello,
I’m trying to use record.load or record.create with custom record and getting errors.
How this syntax needs to be ?
var customRecordToLoad = record.load({
type: record.Type.customrecord_testrecord,
id: 4,
isDynamic: true,
});
ERROR message :
{“type”:”error.SuiteScriptError”,”name”:”SSS_MISSI NG_REQD_ARGUMENT”,”message”:”load: Missing a required argument: type”,”stack”:[“createError(N/error)”,”execute(/SuiteScripts/Accountor Enterprise Solutions/aes_create.js:22)”,”createError(N/error)”],”cause”:{“name”:”SSS_MISSING_REQD_ARGUMENT”,”mess age”:”load: Missing a required argument: type”},”id”:””,”notifyOff”:false}
Can anyone help me with this?
This is a cached copy. Click here to see the original post. -
August 23, 2017 at 6:18 am #18218
Vesku1980Originally posted by Vesku1980
View Post
Hello,
I’m trying to use record.load or record.create with custom record and getting errors.
How this syntax needs to be ?
var customRecordToLoad = record.load({
type: record.Type.customrecord_testrecord,
id: 4,
isDynamic: true,
});
ERROR message :
{“type”:”error.SuiteScriptError”,”name”:”SSS_MISSI NG_REQD_ARGUMENT”,”message”:”load: Missing a required argument: type”,”stack”:[“createError(N/error)”,”execute(/SuiteScripts/Accountor Enterprise Solutions/aes_create.js:22)”,”createError(N/error)”],”cause”:{“name”:”SSS_MISSING_REQD_ARGUMENT”,”mess age”:”load: Missing a required argument: type”},”id”:””,”notifyOff”:false}
Can anyone help me with this?
Problem solved :
var customRecordToLoad = record.load({
type: ‘customrecord_testrecord’,
id: 4,
isDynamic: true,
});
-
August 23, 2017 at 9:45 pm #18219
chanarbonHi Vesku1980
Note that the enum for record.Type are mostly your standard scriptable records. For custom records, you have to use the script id.
-
AuthorPosts
You must be logged in to reply to this topic.