In order to create a new document and insert it to a specific folder via API, must I specify the folder in Database.insert (doc);
method?
I am getting a missing required fields error when testing saying I am missing FolderId
and Name
fields but they are listed, my method is as follows:
Document doc = new Document();
doc.FolderId = (string)requestJson.get('SFDC unique ID of targeted folder");
doc.Body = Blob.valueOf('JSON string');
doc.Id = (string)requestJson.get('Id');
doc.Name = (string)requestJson.get('Name');
Database.insert(doc);
Map<String, Object> m = new Map<String, Object>();
m.put('success', true);
response.responseBody = Blob.valueOf(JSON.serialize(m));
requestJson.get
calls are returning none-null values?