Custom Button Action To Load A Suitelet Page

Client needs to Populate a suitelet page when a custom Button is Clicked from a IF record. /**  * @NApiVersion 2.x  * @NScriptType ClientScript  * @NModuleScope SameAccount  */ define([‘N/currentRecord’,’N/url’,’N/record’], /**  * @param{url} url  */ function(currentRecord,url,record) {         /**      * Function to be executed after page is initialized.      *… Continue reading Custom Button Action To Load A Suitelet Page

User Event Script To Add Print Back Ordered Item Report Button In IF Record

Client requires a custom button to print back-ordered items as a PDF report. /**  * @NApiVersion 2.1  * @NScriptType UserEventScript  */ define([‘N/record’, ‘N/ui/serverWidget’],     /**  * @param{record} record  * @param{serverWidget} serverWidget  */     (record, serverWidget) => {         /**          * Defines the function definition that is… Continue reading User Event Script To Add Print Back Ordered Item Report Button In IF Record

Sample Sweet Alert Script

/** * @NApiVersion 2.x * @NScriptType ClientScript */ define([‘N/ui/dialog’], function(dialog) { function showAlert() { swal(“Hello, world!”); } function showConfirmation() { swal({ title: “Are you sure?”, text: “Once deleted, you will not be able to recover this record!”, icon: “warning”, buttons: true, dangerMode: true, }) .then((willDelete) => { if (willDelete) { swal(“Poof! Your record has been… Continue reading Sample Sweet Alert Script

Removing Values From Standard Sales Order field In Customer Deposit Record

The client wants to unlink the sales order from the customer Deposit based on the payment method in the customer deposit record. if(scriptContext.type ==  scriptContext.UserEventType.CREATE && (scriptContext.newRecord.getValue({fieldId: ‘paymentmethod’}) == 10 ||scriptContext.newRecord.getValue({fieldId: ‘paymentmethod’})==11)){ //             let field = scriptContext.form.getField({id: ‘salesorder’}); //             field.updateDisplayType({ //     displayType : serverWidget.FieldDisplayType.NORMAL // });             scriptContext.newRecord.setValue({fieldId: ‘custbody_jj_sales_order_id’, value:  scriptContext.newRecord.getValue({fieldId: ‘salesorder’})});             scriptContext.newRecord.setValue({fieldId: ‘salesorder’,… Continue reading Removing Values From Standard Sales Order field In Customer Deposit Record

Populating Field Values In Project Task Record After Post Sourcing

Client needs to populate the value at line level. In order to avoid the value overwriting when sourcing, populated value after sourcing. /**  * @NApiVersion 2.x  * @NScriptType ClientScript  * @NModuleScope SameAccount  */ define([‘N/record’, ‘N/search’], /**  * @param{record} record  * @param{search} search  */ function(record, search) {         /**      * Function… Continue reading Populating Field Values In Project Task Record After Post Sourcing

Creating a custom sublist dynamically inside a Record

if(Record_Roles[recordStatus]==runtime.getCurrentUser().role|| runtime.getCurrentUser().role==’3′){ let skillSelected = scriptContext.newRecord.getValue({fieldId: ‘custrecord_jj_skill_rec_req’}); log.debug(“skillSet”,skillSelected) let startDate = scriptContext.newRecord.getText({fieldId: ‘custrecord_jj_rec_req_start’}); let endDate = scriptContext.newRecord.getText({fieldId: ‘custrecord_jj_end_date_rec_req’}); let suggestionDetails=getEmployeeDetails(skillSelected,startDate,endDate); let customTab= scriptContext.form.addTab({ id: ‘custpage_resource_tab’, label: ‘Resource Availablity’ }); let sublist = scriptContext.form.addSublist({ id: ‘custpage_my_sublist’, label: ‘My Sublist Label’, type: serverWidget.SublistType.STATICLIST, tab: ‘custpage_resource_tab’ }); // Add fields to the sublist sublist.addField({ id: ‘custpage_resource’, label: ‘RESOURCE’,… Continue reading Creating a custom sublist dynamically inside a Record

Restricting Item Selection Based On Billing Type In Sales Order

The client needs to restrict the selection of items based on the Billing Type selected on the sales order. /**  * @NApiVersion 2.x  * @NScriptType ClientScript  * @NModuleScope SameAccount  */ /************************************************************************************************  * * Default the Resource Supply Item**  *  *  * **********************************************************************************************  *  * Author: Jobin and Jismi IT Services  *  * Date Created :… Continue reading Restricting Item Selection Based On Billing Type In Sales Order