We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e16f04c commit 3dcd3b5Copy full SHA for 3dcd3b5
README.md
@@ -81,17 +81,20 @@ toast(acct[0].NumberOfEmployees, "success");
81
$A.get("e.force:refreshView").fire();
82
```
83
84
-- Upload files to ContentVersion(ContentDocument) records
+- Add a 'File' to the current record
85
86
```js
87
let fileContent = btoa("Hello World");
88
/* convert your file content to base64 data before uploading */
89
let cv = {
90
VersionData: fileContent,
91
Title: "My Awesome File",
92
- PathOnClient: "MyFile.txt"
+ PathOnClient: "MyFile.txt",
93
+ FirstPublishLocationId: recordId
94
};
95
let cvId = await dml.insert(cv, "ContentVersion");
96
+toast("New file Added", "success");
97
+$A.get("e.force:refreshView").fire();
98
99
100
### About the Syntax
0 commit comments