Monday, 12 August 2024

Friday, 9 August 2024

Increment ItemCode Using Java Script in Intrective Grid

 (function() {

    var grid = apex.region("myGrid").widget().interactiveGrid("getViews", "grid"),

        model = grid.model,

        rowNum = 0,

        p16CatId = $v("P16_CAT_ID"); // Get the value of P16_CAT_ID


    model.forEach(function(record, index) {

        rowNum++;

        var rowNumStr = rowNum.toString().padStart(5, '0'); // Ensure rowNum is 5 digits with leading zeros

        var pls = p16CatId + rowNumStr; // Concatenate P16_CAT_ID and the formatted rowNum

        model.setValue(record, "ICODE", pls);

    });

})();




-----------------------------------------------------------------------------------------------------------------------------





// (function() {

//     var grid = apex.region("myGrid").widget().interactiveGrid("getViews", "grid"),

//         model = grid.model,

//         rowNum = 0;

//     model.forEach(function(record, index) {

//         rowNum++;

//          model.setValue(record, "ICODE", rowNum.toString());

//     });

// })();


Check Internet Connectivity on Local System

if (!navigator.onLine) {     showOfflineAlert(); } else {     // Set a strict 3-second network timeout threshold     const controller = new ...