Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Cannot access type property of returned Object from File.Create method
Hello everyone,
When I create a file successfully from SuiteScript I will get an Object returned like so:
{ "type": "file.File", "id": "xxxxx", "name": "dummy.jpg", "description": "Dummy ", "path": "xxxxxxxxxxxxxxxx", "url": "xxxxxxxxxxxxxxx", "folder": 11659, "fileType": "JPGIMAGE", "isText": false, "size": 93188, "encoding": "UTF-8", "isInactive": false, "isOnline": true }; It seems that I can access all properties of this object, but not the type property. I'm curious why this is not working. When I would like to return the type property like so:
imageObject.type
I get the following string returned: "Unexpected 'o'"
Thanks in advance.
0