I am trying to create custom record using MR scrip...
# suitescript
t
I am trying to create custom record using MR script. But I received this error messag "INVALID_RCRD_TYPE","message":"The record type [CUSTOMRECORD_FEATURE] is invalid."
Copy code
var deltaRecord = record.create({
                type: 'customrecord_feature',
                isDynamic: true
            });
a
the issue here is not the code you've shared... the error message is suggesting that this record type doesn't exist in the account... did you move the script from another environment but not also bring the custom record? ... I can't really figure out an alternate explanation
.. I'm assuming the MR is running as admin? the only other option I could imagine was a permissions issue with the role, but I would expect a different error message for that.
t
Oh I get it now, What I am trying to do is to create a custom record from via script. Is that possible?
a
do you mean 1. you trying to create an instance of an existing custom record type? yes that is absolutely possible. OR... 2. you're trying to create new custom record type for use in the account? I honestly don't know if this is possible in suitescript, I've never done it, and if it is possible the code youve shared isn't how its done. (I suspect it isn't possible at all)
t
yea the 2nd one is what I am trying to achieve. I think I need a new approach on this. Thanks @Anthony OConnor
👍 1