Kris Wood
04/20/2021, 2:05 AMmichoel
04/20/2021, 4:52 AMmichoel
04/20/2021, 4:52 AMconst onRequest = (scriptContext) => {
const list = serverWidget.createList({ title: "Test List" });
list.addColumn({
id: "custpage_test_field",
type: serverWidget.FieldType.TEXT,
label: "Test Field",
});
list.addRows({
rows: [
{ custpage_test_field: "Line 1" },
{ custpage_test_field: "<mark>Line 2</mark>" },
{ custpage_test_field: "Line 3" },
],
});
scriptContext.response.writePage({ pageObject: list });
};
michoel
04/20/2021, 4:53 AMtuli
04/20/2021, 2:08 PMtuli
04/20/2021, 2:09 PMCorey Schwoebel
04/20/2021, 2:16 PMCorey Schwoebel
04/20/2021, 2:17 PMCorey Schwoebel
04/20/2021, 2:22 PMlet table = document.getElementById('item_splits')
for (let i = 0; i < table.rows[2].cells.length; i++) {
table.rows[2].cells[i].style.setProperty("background-color", "#00CC00", "important")
}
Corey Schwoebel
04/20/2021, 2:23 PMtuli
04/20/2021, 4:11 PMCannot read property 'cells' of undefined
Here is a screenshot from console.Corey Schwoebel
04/20/2021, 4:26 PMtuli
04/20/2021, 4:33 PMCorey Schwoebel
04/20/2021, 4:34 PMtuli
04/20/2021, 4:34 PMtuli
04/20/2021, 4:34 PMCorey Schwoebel
04/20/2021, 4:35 PMCorey Schwoebel
04/20/2021, 4:36 PMtuli
04/20/2021, 4:37 PMCorey Schwoebel
04/20/2021, 4:40 PMtuli
04/20/2021, 4:45 PMCorey Schwoebel
04/20/2021, 4:45 PM