@pipedream/salesforce_rest_api 0.3.3
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.
- package/LICENSE +7 -0
- package/actions/salesforce-create-account/salesforce-create-account.mjs +374 -0
- package/actions/salesforce-create-attachment/salesforce-create-attachment.mjs +73 -0
- package/actions/salesforce-create-campaign/salesforce-create-campaign.mjs +148 -0
- package/actions/salesforce-create-case/salesforce-create-case.mjs +179 -0
- package/actions/salesforce-create-casecomment/salesforce-create-casecomment.mjs +58 -0
- package/actions/salesforce-create-contact/salesforce-create-contact.mjs +340 -0
- package/actions/salesforce-create-event/salesforce-create-event.mjs +232 -0
- package/actions/salesforce-create-lead/salesforce-create-lead.mjs +267 -0
- package/actions/salesforce-create-note/salesforce-create-note.mjs +63 -0
- package/actions/salesforce-create-opportunity/salesforce-create-opportunity.mjs +170 -0
- package/actions/salesforce-create-record/salesforce-create-record.mjs +36 -0
- package/actions/salesforce-create-task/salesforce-create-task.mjs +219 -0
- package/actions/salesforce-delete-opportunity/salesforce-delete-opportunity.mjs +37 -0
- package/actions/salesforce-get-sobject-fields-values/salesforce-get-sobject-fields-values.mjs +37 -0
- package/actions/salesforce-insert-blob-data/salesforce-insert-blob-data.mjs +70 -0
- package/actions/salesforce-make-api-call/salesforce-make-api-call.mjs +56 -0
- package/actions/salesforce-soql-search/salesforce-soql-search.mjs +29 -0
- package/actions/salesforce-sosl-search/salesforce-sosl-search.mjs +30 -0
- package/actions/salesforce-update-account/salesforce-update-account.mjs +357 -0
- package/actions/salesforce-update-contact/salesforce-update-contact.mjs +345 -0
- package/actions/salesforce-update-opportunity/salesforce-update-opportunity.mjs +171 -0
- package/actions/salesforce-update-record/salesforce-update-record.mjs +40 -0
- package/package.json +21 -0
- package/salesforce_rest_api.app.mjs +247 -0
- package/sources/common-instant.mjs +134 -0
- package/sources/common.mjs +96 -0
- package/sources/new-object/new-object.mjs +69 -0
- package/sources/new-object-instant/new-object-instant.mjs +35 -0
- package/sources/new-outbound-message/new-outbound-message.mjs +105 -0
- package/sources/object-deleted/object-deleted.mjs +52 -0
- package/sources/object-deleted-instant/object-deleted-instant.mjs +36 -0
- package/sources/object-updated/object-updated.mjs +63 -0
- package/sources/object-updated-instant/object-updated-instant.mjs +36 -0
- package/sources/updated-field-on-record/updated-field-on-record.mjs +179 -0
- package/sources/updated-field-on-record-instant/updated-field-on-record-instant.mjs +76 -0
- package/utils.mjs +27 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// legacy_hash_id: a_bKijKb
|
|
2
|
+
import { axios } from "@pipedream/platform";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "salesforce_rest_api-salesforce-sosl-search",
|
|
6
|
+
name: "SOSL Search",
|
|
7
|
+
description: "Executes the specified SOSL search.",
|
|
8
|
+
version: "0.2.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
salesforce_rest_api: {
|
|
12
|
+
type: "app",
|
|
13
|
+
app: "salesforce_rest_api",
|
|
14
|
+
},
|
|
15
|
+
sosl_search_string: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "The search string in SOSL.\nFor more information on [SOSL see the SOQL and SOSL Reference.](http://www.salesforce.com/us/developer/docs/soql_sosl/index_Left.htm)\nExample: [Search for a String](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_search.htm).",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
async run({ $ }) {
|
|
21
|
+
//See the API docs here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm
|
|
22
|
+
return await axios($, {
|
|
23
|
+
url: `${this.salesforce_rest_api.$auth.instance_url}/services/data/v20.0/search/?q=${encodeURI(this.sosl_search_string)}`,
|
|
24
|
+
headers: {
|
|
25
|
+
Authorization: `Bearer ${this.salesforce_rest_api.$auth.oauth_access_token}`,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
// legacy_hash_id: a_zNiORn
|
|
2
|
+
import { axios } from "@pipedream/platform";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "salesforce_rest_api-salesforce-update-account",
|
|
6
|
+
name: "Update Account",
|
|
7
|
+
description: "Updates a Salesforce account, representing an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).",
|
|
8
|
+
version: "0.2.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
salesforce_rest_api: {
|
|
12
|
+
type: "app",
|
|
13
|
+
app: "salesforce_rest_api",
|
|
14
|
+
},
|
|
15
|
+
AccountId: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "ID of the Account to modify.",
|
|
18
|
+
},
|
|
19
|
+
AccountNumber: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Account number assigned to this account (not the unique, system-generated ID assigned during creation). Maximum size is 40 characters.",
|
|
22
|
+
optional: true,
|
|
23
|
+
},
|
|
24
|
+
AccountSource: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "The source of the account record. For example, Advertisement, Data.com, or Trade Show. The source is selected from a picklist of available values, which are set by an administrator. Each picklist value can have up to 40 characters.",
|
|
27
|
+
optional: true,
|
|
28
|
+
},
|
|
29
|
+
AnnualRevenue: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Estimated annual revenue of the account.",
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
34
|
+
BillingCity: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Details for the billing address of this account. Maximum size is 40 characters.",
|
|
37
|
+
optional: true,
|
|
38
|
+
},
|
|
39
|
+
BillingCountry: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Details for the billing address of this account. Maximum size is 80 characters.",
|
|
42
|
+
optional: true,
|
|
43
|
+
},
|
|
44
|
+
BillingCountryCode: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "The ISO country code for the account's billing address.",
|
|
47
|
+
optional: true,
|
|
48
|
+
},
|
|
49
|
+
BillingGeocodeAccuracy: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Accuracy level of the geocode for the billing address. See [Compound Field Considerations and Limitations](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_limitations.htm#compound_fields_limitations) for details on geolocation compound fields.",
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
54
|
+
BillingLatitude: {
|
|
55
|
+
type: "integer",
|
|
56
|
+
description: "Used with BillingLongitude to specify the precise geolocation of a billing address. Acceptable values are numbers between 90 and 90 with up to 15 decimal places. See [Compound Field Considerations and Limitations](Accuracy level of the geocode for the billing address. See [Compound Field Considerations and Limitations](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_limitations.htm#compound_fields_limitations) for details on geolocation compound fields.) for details on geolocation compound fields.",
|
|
57
|
+
optional: true,
|
|
58
|
+
},
|
|
59
|
+
BillingLongitude: {
|
|
60
|
+
type: "integer",
|
|
61
|
+
description: "Used with BillingLatitude to specify the precise geolocation of a billing address. Acceptable values are numbers between 180 and 180 with up to 15 decimal places. See [Compound Field Considerations and Limitations](atlas.en-us.api.meta/api/compound_fields_limitations.htm#compound_fields_limitations) for details on geolocation compound fields.",
|
|
62
|
+
optional: true,
|
|
63
|
+
},
|
|
64
|
+
BillingPostalCode: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Details for the billing address of this account. Maximum size is 20 characters.",
|
|
67
|
+
optional: true,
|
|
68
|
+
},
|
|
69
|
+
BillingState: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "Details for the billing address of this account. Maximum size is 80 characters.",
|
|
72
|
+
optional: true,
|
|
73
|
+
},
|
|
74
|
+
BillingStateCode: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "The ISO state code for the account's billing address.",
|
|
77
|
+
optional: true,
|
|
78
|
+
},
|
|
79
|
+
BillingStreet: {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "Street address for the billing address of this account.",
|
|
82
|
+
optional: true,
|
|
83
|
+
},
|
|
84
|
+
CleanStatus: {
|
|
85
|
+
type: "string",
|
|
86
|
+
description: "Indicates the record's clean status as compared with Data.com. Values are: Matched, Different, Acknowledged, NotFound, Inactive, Pending, SelectMatch, or Skipped.Several values for CleanStatus display with different labels on the account record detail page. Matched displays as In Sync Acknowledged displays as Reviewed Pending displays as Not Compared",
|
|
87
|
+
optional: true,
|
|
88
|
+
},
|
|
89
|
+
Description: {
|
|
90
|
+
type: "string",
|
|
91
|
+
description: "Text description of the account. Limited to 32,000 KB.",
|
|
92
|
+
optional: true,
|
|
93
|
+
},
|
|
94
|
+
DunsNumber: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: "The Data Universal Numbering System (D-U-N-S) number is a unique, nine-digit number assigned to every business location in the Dun & Bradstreet database that has a unique, separate, and distinct operation. D-U-N-S numbers are used by industries and organizations around the world as a global standard for business identification and tracking. Maximum size is 9 characters. This field is available on business accounts, not person accounts. Note This field is only available to organizations that use Data.com Prospector or Data.com Clean.",
|
|
97
|
+
optional: true,
|
|
98
|
+
},
|
|
99
|
+
Fax: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "Fax number for the account.",
|
|
102
|
+
optional: true,
|
|
103
|
+
},
|
|
104
|
+
HasOptedOutOfEmail: {
|
|
105
|
+
type: "boolean",
|
|
106
|
+
description: "Indicates whether the contact doesn't want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.",
|
|
107
|
+
optional: true,
|
|
108
|
+
},
|
|
109
|
+
Industry: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "An industry associated with this account. Maximum size is 40 characters.",
|
|
112
|
+
optional: true,
|
|
113
|
+
},
|
|
114
|
+
IsCustomerPortal: {
|
|
115
|
+
type: "boolean",
|
|
116
|
+
description: "Indicates whether the account has at least one contact enabled to use the organization's Customer Portal (true) or not (false). This field is available if Customer Portal is enabled OR Communities is enabled and you have Customer Portal licenses.If you change this field's value from true to false, you can disable up to 100 Customer Portal users associated with the account and permanently delete all of the account's Customer Portal roles and groups. You can't restore deleted Customer Portal roles and groups. This field can be updated in API version 16.0 and later. Tip We recommend that you update up to 50 contacts simultaneously when changing the accounts on contacts enabled for a Customer Portal or partner portal. We also recommend that you make this update after business hours.",
|
|
117
|
+
optional: true,
|
|
118
|
+
},
|
|
119
|
+
IsPartner: {
|
|
120
|
+
type: "boolean",
|
|
121
|
+
description: "Indicates whether the account has at least one contact enabled to use the organization's partner portal (true) or not (false). This field is available if partner relationship management (partner portal) is enabled OR Communities is enabled and you have partner portal licenses.If you change this field's value from true to false, you can disable up to 15 partner portal users associated with the account and permanently delete all of the account's partner portal roles and groups. You can't restore deleted partner portal roles and groups. Disabling a partner portal user in the Salesforce user interface or the API does not change this field's value from true to false. Even if this field's value is false, you can enable a contact on an account as a partner portal user via the API. This field can be updated in API version 16.0 and later. Tip We recommend that you update up to 50 contacts simultaneously when changing the accounts on contacts enabled for a Customer Portal or partner portal. We also recommend that you make this update after business hours.",
|
|
122
|
+
optional: true,
|
|
123
|
+
},
|
|
124
|
+
Jigsaw: {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "References the ID of a company in Data.com. If an account has a value in this field, it means that the account was imported from Data.com. If the field value is null, the account was not imported from Data.com. Maximum size is 20 characters. Available in API version 22.0 and later. Label is Data.com Key. This field is available on business accounts, not person accounts. Important The Jigsaw field is exposed in the API to support troubleshooting for import errors and reimporting of corrected data. Do not modify the value in the Jigsaw field.",
|
|
127
|
+
optional: true,
|
|
128
|
+
},
|
|
129
|
+
NaicsCode: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "The six-digit North American Industry Classification System (NAICS) code is the standard used by business and government to classify business establishments into industries, according to their economic activity for the purpose of collecting, analyzing, and publishing statistical data related to the U.S. business economy. Maximum size is 8 characters. This field is available on business accounts, not person accounts. Note This field is only available to organizations that use Data.com Prospector or Data.com Clean.",
|
|
132
|
+
optional: true,
|
|
133
|
+
},
|
|
134
|
+
NaicsDesc: {
|
|
135
|
+
type: "string",
|
|
136
|
+
description: "A brief description of an organization's line of business, based on its NAICS code. Maximum size is 120 characters. This field is available on business accounts, not person accounts. Note This field is only available to organizations that use Data.com Prospector or Data.com Clean.",
|
|
137
|
+
optional: true,
|
|
138
|
+
},
|
|
139
|
+
Name: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "Required. Label is Account Name. Name of the account. Maximum size is 255 characters. If the account has a record type of Person Account: This value is the concatenation of the FirstName, MiddleName, LastName, and Suffix of the associated person contact. You can't modify this value.",
|
|
142
|
+
optional: true,
|
|
143
|
+
},
|
|
144
|
+
NumberOfEmployees: {
|
|
145
|
+
type: "integer",
|
|
146
|
+
description: "Label is Employees. Number of employees working at the company represented by this account. Maximum size is eight digits.",
|
|
147
|
+
optional: true,
|
|
148
|
+
},
|
|
149
|
+
OperatingHoursId: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "The operating hours associated with the account. Available only if Field Service Lightning is enabled.",
|
|
152
|
+
optional: true,
|
|
153
|
+
},
|
|
154
|
+
OwnerId: {
|
|
155
|
+
type: "string",
|
|
156
|
+
description: "The ID of the user who currently owns this account. Default value is the user logged in to the API to perform the create.If you have set up account teams in your organization, updating this field has different consequences depending on your version of the API: For API version 12.0 and later, sharing records are kept, as they are for all objects. For API version before 12.0, sharing records are deleted. For API version 16.0 and later, users must have the Transfer Record permission in order to update (transfer) account ownership using this field.",
|
|
157
|
+
optional: true,
|
|
158
|
+
},
|
|
159
|
+
Ownership: {
|
|
160
|
+
type: "string",
|
|
161
|
+
description: "Ownership type for the account, for example Private, Public, or Subsidiary.",
|
|
162
|
+
optional: true,
|
|
163
|
+
},
|
|
164
|
+
ParentId: {
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "ID of the parent object, if any.",
|
|
167
|
+
optional: true,
|
|
168
|
+
},
|
|
169
|
+
PersonIndividualId: {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "ID of the data privacy record associated with this person's account. This field is available if you enabled Data Protection and Privacy in Setup.",
|
|
172
|
+
optional: true,
|
|
173
|
+
},
|
|
174
|
+
Phone: {
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "Phone number for this account. Maximum size is 40 characters.",
|
|
177
|
+
optional: true,
|
|
178
|
+
},
|
|
179
|
+
Rating: {
|
|
180
|
+
type: "string",
|
|
181
|
+
description: "The account's prospect rating, for example Hot, Warm, or Cold.",
|
|
182
|
+
optional: true,
|
|
183
|
+
},
|
|
184
|
+
RecordTypeId: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "ID of the record type assigned to this object.",
|
|
187
|
+
optional: true,
|
|
188
|
+
},
|
|
189
|
+
Salutation: {
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "Honorific added to the name for use in letters, etc.",
|
|
192
|
+
optional: true,
|
|
193
|
+
},
|
|
194
|
+
ShippingCity: {
|
|
195
|
+
type: "string",
|
|
196
|
+
description: "Details of the shipping address for this account. City maximum size is 40 characters",
|
|
197
|
+
optional: true,
|
|
198
|
+
},
|
|
199
|
+
ShippingCountry: {
|
|
200
|
+
type: "string",
|
|
201
|
+
description: "Details of the shipping address for this account. Country maximum size is 80 characters.",
|
|
202
|
+
optional: true,
|
|
203
|
+
},
|
|
204
|
+
ShippingCountryCode: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "The ISO country code for the account's shipping address.",
|
|
207
|
+
optional: true,
|
|
208
|
+
},
|
|
209
|
+
ShippingGeocodeAccuracy: {
|
|
210
|
+
type: "string",
|
|
211
|
+
description: "Accuracy level of the geocode for the shipping address. See [Compound Field Considerations and Limitations](Accuracy level of the geocode for the billing address. See [Compound Field Considerations and Limitations](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_limitations.htm#compound_fields_limitations) for details on geolocation compound fields.) for details on geolocation compound fields.",
|
|
212
|
+
optional: true,
|
|
213
|
+
},
|
|
214
|
+
ShippingLatitude: {
|
|
215
|
+
type: "integer",
|
|
216
|
+
description: "Used with ShippingLongitude to specify the precise geolocation of a shipping address. Acceptable values are numbers between 90 and 90 with up to 15 decimal places. See [Compound Field Considerations and Limitations](Accuracy level of the geocode for the billing address. See [Compound Field Considerations and Limitations](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_limitations.htm#compound_fields_limitations) for details on geolocation compound fields.) for details on geolocation compound fields.",
|
|
217
|
+
optional: true,
|
|
218
|
+
},
|
|
219
|
+
ShippingLongitude: {
|
|
220
|
+
type: "integer",
|
|
221
|
+
description: "Used with ShippingLatitude to specify the precise geolocation of an address. Acceptable values are numbers between 180 and 180 with up to 15 decimal places. See [Compound Field Considerations and Limitations](Accuracy level of the geocode for the billing address. See [Compound Field Considerations and Limitations](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_limitations.htm#compound_fields_limitations) for details on geolocation compound fields.) for details on geolocation compound fields.",
|
|
222
|
+
optional: true,
|
|
223
|
+
},
|
|
224
|
+
ShippingPostalCode: {
|
|
225
|
+
type: "string",
|
|
226
|
+
description: "Details of the shipping address for this account. Postal code maximum size is 20 characters.",
|
|
227
|
+
optional: true,
|
|
228
|
+
},
|
|
229
|
+
ShippingState: {
|
|
230
|
+
type: "string",
|
|
231
|
+
description: "Details of the shipping address for this account. State maximum size is 80 characters.",
|
|
232
|
+
optional: true,
|
|
233
|
+
},
|
|
234
|
+
ShippingStateCode: {
|
|
235
|
+
type: "string",
|
|
236
|
+
description: "The ISO state code for the account's shipping address.",
|
|
237
|
+
optional: true,
|
|
238
|
+
},
|
|
239
|
+
ShippingStreet: {
|
|
240
|
+
type: "string",
|
|
241
|
+
description: "The street address of the shipping address for this account. Maximum of 255 characters.",
|
|
242
|
+
optional: true,
|
|
243
|
+
},
|
|
244
|
+
Sic: {
|
|
245
|
+
type: "string",
|
|
246
|
+
description: "Standard Industrial Classification code of the company's main business categorization, for example, 57340 for Electronics. Maximum of 20 characters. This field is available on business accounts, not person accounts.",
|
|
247
|
+
optional: true,
|
|
248
|
+
},
|
|
249
|
+
SicDesc: {
|
|
250
|
+
type: "string",
|
|
251
|
+
description: "A brief description of an organization's line of business, based on its SIC code. Maximum length is 80 characters. This field is available on business accounts, not person accounts.",
|
|
252
|
+
optional: true,
|
|
253
|
+
},
|
|
254
|
+
Site: {
|
|
255
|
+
type: "string",
|
|
256
|
+
description: "Name of the account's location, for example Headquarters or London. Label is Account Site. Maximum of 80 characters.",
|
|
257
|
+
optional: true,
|
|
258
|
+
},
|
|
259
|
+
TickerSymbol: {
|
|
260
|
+
type: "string",
|
|
261
|
+
description: "The stock market symbol for this account. Maximum of 20 characters. This field is available on business accounts, not person accounts.",
|
|
262
|
+
optional: true,
|
|
263
|
+
},
|
|
264
|
+
Tradestyle: {
|
|
265
|
+
type: "string",
|
|
266
|
+
description: "A name, different from its legal name, that an organization may use for conducting business. Similar to Doing business as or DBA. Maximum length is 255 characters. This field is available on business accounts, not person accounts. Note This field is only available to organizations that use Data.com Prospector or Data.com Clean.",
|
|
267
|
+
optional: true,
|
|
268
|
+
},
|
|
269
|
+
Type: {
|
|
270
|
+
type: "string",
|
|
271
|
+
description: "Type of account, for example, Customer, Competitor, or Partner.",
|
|
272
|
+
optional: true,
|
|
273
|
+
},
|
|
274
|
+
Website: {
|
|
275
|
+
type: "string",
|
|
276
|
+
description: "The website of this account. Maximum of 255 characters.",
|
|
277
|
+
optional: true,
|
|
278
|
+
},
|
|
279
|
+
YearStarted: {
|
|
280
|
+
type: "string",
|
|
281
|
+
description: "The date when an organization was legally established. Maximum length is 4 characters. This field is available on business accounts, not person accounts. Note This field is only available to organizations that use Data.com Prospector or Data.com Clean.",
|
|
282
|
+
optional: true,
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
async run({ $ }) {
|
|
286
|
+
// See the API docs here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm
|
|
287
|
+
// Account object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_account.htm
|
|
288
|
+
|
|
289
|
+
if (!this.AccountId) {
|
|
290
|
+
throw new Error("Must provide AccountId parameter.");
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return await axios($, {
|
|
294
|
+
"method": "patch",
|
|
295
|
+
"url": `${this.salesforce_rest_api.$auth.instance_url}/services/data/v20.0/sobjects/Account/${this.AccountId}`,
|
|
296
|
+
"Content-Type": "application/json",
|
|
297
|
+
"headers": {
|
|
298
|
+
Authorization: `Bearer ${this.salesforce_rest_api.$auth.oauth_access_token}`,
|
|
299
|
+
},
|
|
300
|
+
"data": {
|
|
301
|
+
AccountNumber: this.AccountNumber,
|
|
302
|
+
AccountSource: this.AccountSource,
|
|
303
|
+
AnnualRevenue: this.AnnualRevenue,
|
|
304
|
+
BillingCity: this.BillingCity,
|
|
305
|
+
BillingCountry: this.BillingCountry,
|
|
306
|
+
BillingCountryCode: this.BillingCountryCode,
|
|
307
|
+
BillingGeocodeAccuracy: this.BillingGeocodeAccuracy,
|
|
308
|
+
BillingLatitude: this.BillingLatitude,
|
|
309
|
+
BillingLongitude: this.BillingLongitude,
|
|
310
|
+
BillingPostalCode: this.BillingPostalCode,
|
|
311
|
+
BillingState: this.BillingState,
|
|
312
|
+
BillingStateCode: this.BillingStateCode,
|
|
313
|
+
BillingStreet: this.BillingStreet,
|
|
314
|
+
CleanStatus: this.CleanStatus,
|
|
315
|
+
Description: this.Description,
|
|
316
|
+
DunsNumber: this.DunsNumber,
|
|
317
|
+
Fax: this.Fax,
|
|
318
|
+
HasOptedOutOfEmail: this.HasOptedOutOfEmail,
|
|
319
|
+
Industry: this.Industry,
|
|
320
|
+
IsCustomerPortal: this.IsCustomerPortal,
|
|
321
|
+
IsPartner: this.IsPartner,
|
|
322
|
+
Jigsaw: this.Jigsaw,
|
|
323
|
+
NaicsCode: this.NaicsCode,
|
|
324
|
+
NaicsDesc: this.NaicsDesc,
|
|
325
|
+
Name: this.Name,
|
|
326
|
+
NumberOfEmployees: this.NumberOfEmployees,
|
|
327
|
+
OperatingHoursId: this.OperatingHoursId,
|
|
328
|
+
OwnerId: this.OwnerId,
|
|
329
|
+
Ownership: this.Ownership,
|
|
330
|
+
ParentId: this.ParentId,
|
|
331
|
+
PersonIndividualId: this.PersonIndividualId,
|
|
332
|
+
Phone: this.Phone,
|
|
333
|
+
Rating: this.Rating,
|
|
334
|
+
RecordTypeId: this.RecordTypeId,
|
|
335
|
+
Salutation: this.Salutation,
|
|
336
|
+
ShippingCity: this.ShippingCity,
|
|
337
|
+
ShippingCountry: this.ShippingCountry,
|
|
338
|
+
ShippingCountryCode: this.ShippingCountryCode,
|
|
339
|
+
ShippingGeocodeAccuracy: this.ShippingGeocodeAccuracy,
|
|
340
|
+
ShippingLatitude: this.ShippingLatitude,
|
|
341
|
+
ShippingLongitude: this.ShippingLongitude,
|
|
342
|
+
ShippingPostalCode: this.ShippingPostalCode,
|
|
343
|
+
ShippingState: this.ShippingState,
|
|
344
|
+
ShippingStateCode: this.ShippingStateCode,
|
|
345
|
+
ShippingStreet: this.ShippingStreet,
|
|
346
|
+
Sic: this.Sic,
|
|
347
|
+
SicDesc: this.SicDesc,
|
|
348
|
+
Site: this.Site,
|
|
349
|
+
TickerSymbol: this.TickerSymbol,
|
|
350
|
+
Tradestyle: this.Tradestyle,
|
|
351
|
+
Type: this.Type,
|
|
352
|
+
Website: this.Website,
|
|
353
|
+
YearStarted: this.YearStarted,
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
},
|
|
357
|
+
};
|