title: Cannot create a Restlet dynamically with ss2.0
body: <p>Why do I get a <code>"Record cannot be created or deleted"</code> error message when trying to create a script record of type <code>record.Type.RESTLET</code>. Has anyone encountered this before or know a workaround? The file gets created fine btw so not sure if there a limitations on creating scripts dymamically</p>
  
  <pre class="lang-js prettyprint-override"><code>// create the script file and use the id in the restlet script creation below
  const script = this.modules.file.create({
      name: `MyRestletFile.js`,
      fileType: this.modules.file.Type.JAVASCRIPT,
      contents: "/**\n@NApiVersion 2.x\n@NScriptType Restlet\n@NModuleScope Public\n*/\ndefine([], function () {return {get: function () {return 'Hello World!'}, post: function (context) {return JSON.stringify(context);}}}); ",
      folder: 123456
  });
  const scriptFileID = script.save();
  
  // create the restlet script dynamically
  const restlet = this.modules.record.create({type: this.modules.record.Type.RESTLET, isDynamic: false});
  restlet.setValue({fieldId: 'name', value: 'MyCustomRestlet'});
  restlet.setValue({fieldId: 'apiversion', value: '2.0'});
  restlet.setValue({fieldId: 'scriptid', value: 'my_custom_restlet'});
  restlet.setValue({fieldId: 'scriptfile', value: scriptFileID});
  restlet.setValue({fieldId: 'owner', value: 6789});
  const scriptId = restlet.save();
  </code></pre>