This topic contains 2 replies, has 0 voices, and was last updated by chanarbon 7 years, 2 months ago.

  • Author
    Posts
  • #18217

    Vesku1980

    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?
    This is a cached copy. Click here to see the original post.

  • #18218

    Vesku1980

    Originally 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,

    });

  • #18219

    chanarbon

    Hi Vesku1980

    Note that the enum for record.Type are mostly your standard scriptable records. For custom records, you have to use the script id.

You must be logged in to reply to this topic.