@pipedream/salesforce_rest_api 1.10.3 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import common, { getProps } from "../common/base-create-update.mjs";
|
|
2
|
+
import contentNote from "../../common/sobjects/content-note.mjs";
|
|
3
|
+
|
|
4
|
+
const docsLink = "https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contentnote.htm";
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
salesforce, ...props
|
|
8
|
+
} = getProps({
|
|
9
|
+
createOrUpdate: "update",
|
|
10
|
+
objType: contentNote,
|
|
11
|
+
docsLink,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
...common,
|
|
16
|
+
key: "salesforce_rest_api-update-content-note",
|
|
17
|
+
name: "Update Content Note",
|
|
18
|
+
description: `Updates an enhanced Salesforce content note, which can include formatted text and is part of Salesforce Files. [See the documentation](${docsLink}) and [Set Up Notes](https://help.salesforce.com/s/articleView?id=sales.notes_admin_setup.htm&type=5).`,
|
|
19
|
+
version: "0.0.1",
|
|
20
|
+
type: "action",
|
|
21
|
+
annotations: {
|
|
22
|
+
destructiveHint: true,
|
|
23
|
+
openWorldHint: true,
|
|
24
|
+
readOnlyHint: false,
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
...common.methods,
|
|
28
|
+
getObjectType() {
|
|
29
|
+
return "ContentNote";
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
salesforce,
|
|
34
|
+
contentNoteId: {
|
|
35
|
+
propDefinition: [
|
|
36
|
+
salesforce,
|
|
37
|
+
"recordId",
|
|
38
|
+
() => ({
|
|
39
|
+
objType: "ContentNote",
|
|
40
|
+
nameField: "Title",
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
label: "Content Note ID",
|
|
44
|
+
description: "The ID of the content note to update.",
|
|
45
|
+
},
|
|
46
|
+
...props,
|
|
47
|
+
},
|
|
48
|
+
async run({ $ }) {
|
|
49
|
+
/* eslint-disable no-unused-vars */
|
|
50
|
+
const {
|
|
51
|
+
salesforce,
|
|
52
|
+
contentNoteId,
|
|
53
|
+
getAdvancedProps,
|
|
54
|
+
getObjectType,
|
|
55
|
+
getAdditionalFields,
|
|
56
|
+
formatDateTimeProps,
|
|
57
|
+
useAdvancedProps,
|
|
58
|
+
docsInfo,
|
|
59
|
+
dateInfo,
|
|
60
|
+
additionalFields,
|
|
61
|
+
...data
|
|
62
|
+
} = this;
|
|
63
|
+
/* eslint-enable no-unused-vars */
|
|
64
|
+
await salesforce.updateRecord("ContentNote", {
|
|
65
|
+
$,
|
|
66
|
+
id: contentNoteId,
|
|
67
|
+
data: {
|
|
68
|
+
...data,
|
|
69
|
+
...getAdditionalFields(),
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
$.export("$summary", `Successfully updated content note (ID: ${contentNoteId})`);
|
|
74
|
+
|
|
75
|
+
return salesforce.getSObject("ContentNote", contentNoteId);
|
|
76
|
+
},
|
|
77
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import common, { getProps } from "../common/base-create-update.mjs";
|
|
2
|
+
import note from "../../common/sobjects/note.mjs";
|
|
3
|
+
|
|
4
|
+
const docsLink = "https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_note.htm";
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
salesforce, ...props
|
|
8
|
+
} = getProps({
|
|
9
|
+
createOrUpdate: "update",
|
|
10
|
+
objType: note,
|
|
11
|
+
docsLink,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
...common,
|
|
16
|
+
key: "salesforce_rest_api-update-note",
|
|
17
|
+
name: "Update Note",
|
|
18
|
+
description: `Updates a classic Salesforce note, which can contain up to 32 KB of text and is associated with a parent record. [See the documentation](${docsLink})`,
|
|
19
|
+
version: "0.0.1",
|
|
20
|
+
type: "action",
|
|
21
|
+
annotations: {
|
|
22
|
+
destructiveHint: true,
|
|
23
|
+
openWorldHint: true,
|
|
24
|
+
readOnlyHint: false,
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
...common.methods,
|
|
28
|
+
getObjectType() {
|
|
29
|
+
return "Note";
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
salesforce,
|
|
34
|
+
noteId: {
|
|
35
|
+
propDefinition: [
|
|
36
|
+
salesforce,
|
|
37
|
+
"recordId",
|
|
38
|
+
() => ({
|
|
39
|
+
objType: "Note",
|
|
40
|
+
nameField: "Title",
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
label: "Note ID",
|
|
44
|
+
description: "The ID of the note to update.",
|
|
45
|
+
},
|
|
46
|
+
...props,
|
|
47
|
+
},
|
|
48
|
+
async run({ $ }) {
|
|
49
|
+
/* eslint-disable no-unused-vars */
|
|
50
|
+
const {
|
|
51
|
+
salesforce,
|
|
52
|
+
noteId,
|
|
53
|
+
getAdvancedProps,
|
|
54
|
+
getObjectType,
|
|
55
|
+
getAdditionalFields,
|
|
56
|
+
formatDateTimeProps,
|
|
57
|
+
useAdvancedProps,
|
|
58
|
+
docsInfo,
|
|
59
|
+
dateInfo,
|
|
60
|
+
additionalFields,
|
|
61
|
+
...data
|
|
62
|
+
} = this;
|
|
63
|
+
/* eslint-enable no-unused-vars */
|
|
64
|
+
|
|
65
|
+
await salesforce.updateRecord("Note", {
|
|
66
|
+
$,
|
|
67
|
+
id: noteId,
|
|
68
|
+
data: {
|
|
69
|
+
...data,
|
|
70
|
+
...getAdditionalFields(),
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
$.export("$summary", `Successfully updated note (ID: ${noteId})`);
|
|
75
|
+
|
|
76
|
+
return salesforce.getSObject("Note", noteId);
|
|
77
|
+
},
|
|
78
|
+
};
|