Update latitude & longitude address field API
How do I update the coordinates of an address field from a widget? I can't modify the latitude and longitude of the address field. I think the problem is how I'm writing formdata variable.
zoho_init.then(function (data) {
var queryParams = ZOHO.CREATOR.UTIL.getQueryParams();
var Veh_Status1 = queryParams.IDStatus;
var formData = {
"Coordenadas" : {
"latitude" : latitude,
"longitude" : longitude
}
};
var configp = {
appName : "gpbcis",
reportName : "Envio_Status_Online",
id: Veh_Status1,
data: {
data: formData
}
};
ZOHO.CREATOR.API.updateRecord(configp).then(function(response){
if(response.code == 3000){
console.log("Posición guardada: " + latitude + " " + longitude );
}
});
});
alert('Posicion guardada ');