You need to sign in to do that
Don't have an account?
Nishant Shrivastava 30
i am not able to update the field namely status
here is my code, kindly provide input, i am taking invoice id from checkbox and comparing it in my query and trying to update the field downloaded__c = true but it is not working. any help will be appreciable and thanks in advance
function updateRecords() {
const checkboxes = document.querySelectorAll('input[type=checkbox].invoiceCheckBox:checked');
var recordsData = [];
for (let i = 0, l = checkboxes.length; i < l; i++) {
recordsData.push({id: checkboxes[i].dataset.id,});
console.log("nnnnn",recordsData);
let query = `SELECT id, Downloaded__c FROM kognoz1__Invoice2__c where id='${recordsData[i].id}'`;
let result = sforce.connection.query(query);
result.Downloaded__c = true;
var result1 = sforce.connection.update([result]);
}
}
i shall be grateful to you for your kind consideration.
function updateRecords() {
const checkboxes = document.querySelectorAll('input[type=checkbox].invoiceCheckBox:checked');
var recordsData = [];
for (let i = 0, l = checkboxes.length; i < l; i++) {
recordsData.push({id: checkboxes[i].dataset.id,});
console.log("nnnnn",recordsData);
let query = `SELECT id, Downloaded__c FROM kognoz1__Invoice2__c where id='${recordsData[i].id}'`;
let result = sforce.connection.query(query);
result.Downloaded__c = true;
var result1 = sforce.connection.update([result]);
}
}
i shall be grateful to you for your kind consideration.