You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$.export("$summary",`Successfully created new object with ID ${res.data[0].details.id}.`);
64
+
}else{
65
+
if(res.data[0].code==="INVALID_DATA"){
66
+
thrownewConfigurationError(`Error: Invalid data for field '${res.data[0].details.api_name}'. Expected data type: ${res.data[0].details.expected_data_type}`);
description: "Updates existing entities in the module. [See the documentation](https://www.zoho.com/crm/developer/docs/api/v2/update-records.html)",
9
-
version: "0.3.2",
10
+
version: "0.3.3",
10
11
type: "action",
11
12
props: {
12
13
...common.props,
@@ -58,13 +59,21 @@ export default {
58
59
...otherProps,
59
60
});
60
61
61
-
constresponse=awaitzohoCrm.updateObject(
62
+
constres=awaitzohoCrm.updateObject(
62
63
moduleType,
63
64
recordId,
64
-
object,
65
+
this.parseFields(object),
65
66
$,
66
67
);
67
-
$.export("$summary",`Successfully updated object with ID ${recordId}.`);
68
-
returnresponse;
68
+
69
+
if(res.data[0].code==="SUCCESS"){
70
+
$.export("$summary",`Successfully updated object with ID ${recordId}.`);
71
+
}else{
72
+
if(res.data[0].code==="INVALID_DATA"){
73
+
thrownewConfigurationError(`Error: Invalid data for field '${res.data[0].details.api_name}'. Expected data type: ${res.data[0].details.expected_data_type}`);
0 commit comments