How to create alert in with Ok and cancel button in client script

if (scriptContext.fieldId == ‘custbody_jj_wave_delivery_fee’) { let deliveryWaiver = currentRecord.getValue({ fieldId: ‘custbody_jj_wave_delivery_fee’ }); if (deliveryWaiver) { let options = “Are you sure you want to waive delivery fee? Please enter the reason.”; currentRecord.getField({ fieldId: ‘custbody_jj_deli_fee_reason’ }).isMandatory = true if (window.confirm(options)) { return true; } else { currentRecord.getField({ fieldId: ‘custbody_jj_deli_fee_reason’ }).isMandatory = false currentRecord.setValue({ fieldId: ‘custbody_jj_wave_delivery_fee’, value:… Continue reading How to create alert in with Ok and cancel button in client script

How to set suite let select field options in client script.

Here we have set the puchase order list for the selecting vendor. //this is the list of vendors with their related purchase order  let poList = JSON.parse(currentRecord.getValue({                         fieldId: ‘custpage_polist’                     }));      … Continue reading How to set suite let select field options in client script.

How to render the transaction as PDF and get the PDF as Base64 encode format

 let transactionFile = render.transaction({                         entityId: parseInt(internal id of the transaction)                         printMode: render.PrintMode.PDF,                                      … Continue reading How to render the transaction as PDF and get the PDF as Base64 encode format

How to pass parameters to suite let page by using HTML

<body> <div class=”button-container”>   <form action=”#” method=”post”>     <input type=”submit” value=”Logout” onclick=”logout()”>      </form> </div> <script> function logout(){ alert(“You have been logged out.Please login again!”);  window.open(” URL of the suitelet page which you need to open when click logout button”);   window.close();   window.history.forward();   var formData = new FormData();   formData.append(‘logoutId’,true);  … Continue reading How to pass parameters to suite let page by using HTML

How to create alert based on suitelet button in suitelet page

 Here, we just show the alert and moving back to the previous page.  function alertExpense(scriptContext) {             try {                 let html = ‘<script>alert(“Please add expenses before submit.”);window.history.back();</script>’;                 scriptContext.response.write(html);            … Continue reading How to create alert based on suitelet button in suitelet page