How to add an image in a Suitelet using JQuery

function pageInit(scriptContext) {
            curRec = scriptContext.currentRecord;
            form = scriptContext.form;
            let lineCnt = curRec.getLineCount({
                sublistId: '_jj_sublist'
            });
            for (let i = 1; i <= lineCnt; i++) {
                jQuery("#custrecord_jj_receiptdate" + i + "_helper_calendar").css({
                    "background-size": "cover",
                    "background-image": "url(https://687719-sb1.app.netsuite.com/core/media/media.nl?id=942739&c=687719_SB1&h=us80wqKr4I0BQUfV3Q1dkhi_uQyhpCrhZogQHSsK2yePG2Eq&fcts=20230917232450&whence=)",
                    "width": "20px",
                    "height": "20px",
                    "display": "inline-block"
                });
                jQuery("#custrecord_jj_receiptdate" + i + "_helper_calendar").text("");
            }
        }

Leave a comment

Your email address will not be published. Required fields are marked *