I have some JS code and I'm trying to make an API call, and concatenate a variable and string together. However, when I run my code and try to upload the information. It doesnt work. I just want to know if this piece of JS code is in th ecorrect format. Let me know and thanks!
api.call("Add", {
typeName: "Zone",
entity: {
name: zoneName + " - [Click here to send whatsapp to"+zoneName+"](https://wa.me/"+customerNumber+"?text=Your%20order%20has%20just%20been%20delivered.%20Thanks!",
comment: deliveryDetails,
externalReference: "",
mustIdentifyStops: true,
displayed: zoneDisplayed,
activeFrom: "1986-01-01T00:00:00.000Z",
activeTo: "2050-01-01T00:00:00.000Z",
zoneTypes: ["ZoneTypeCustomerId"],
groups: [{
id: "GroupCompanyId"
}],
points: zonePoints,
fillColor: {
r: 233,
g: 150,
b: 122,
a: 255
}
}
}, function (result) {
alert("Successfully created zone for customer " + zoneName);
}, function (error) {
console.log(error);
Aucun commentaire:
Enregistrer un commentaire