We can enable the checkbox ‘ENABLE OPTIMISTIC LOCKING’ in the custom record for this restriction. Enabling this option causes the system to check for conflicting updates whenever a user attempts to save updates to a custom record instance. If another user has saved updates to the same custom record instance while the first user was… Continue reading How to Restrict the editing of a same custom record by different users at the same time
Author: Aswathy Viswanathan
How to Add Minimum and Maximum restriction in Weekly Time Sheet Time Tracking
let currentRecord = scriptContext.currentRecord; let lineCount = currentRecord.getLineCount({ sublistId: ‘timeitem’ }); let weekData = getWeeklyData(currentRecord, lineCount) console.log(‘weekData in save record’, weekData); let employee… Continue reading How to Add Minimum and Maximum restriction in Weekly Time Sheet Time Tracking
How to restrict approving of a weekly timesheet by particular roles
When we create the weekly timesheet records individual time track records are created. Hence for restricting the approving of the Weekly time sheet we need to deploy scripts in the time track records and throw errors. const beforeSubmit = (scriptContext) => { let newRec = scriptContext.newRecord; let status =… Continue reading How to restrict approving of a weekly timesheet by particular roles
How to Create weekly timesheet with approved status
When we create the weekly timesheet records individual time track records are created. Hence for creating the Weekly time sheet with an approved status by and particular role deploy scripts in the time track records and create the weekly time sheet records. if (currentRole == ROLES.IPFF_DIRECTOR && currentEmployee == ROLES.IPPF_DIRECTOR_EMP) { … Continue reading How to Create weekly timesheet with approved status
How to Calculate the dates in weekly timesheet
let weekdays = [‘sunday’, ‘monday’, ‘tuesday’, ‘wednesday’, ‘thursday’, ‘friday’, ‘saturday’]; let dateObj = {}; // Calculate dates for each day of the week let weekDayDate = new Date(currentRecord.getValue({ fieldId: ‘trandate’ }));… Continue reading How to Calculate the dates in weekly timesheet
How to Trigger the Suitelet in Client Script
let suiteletUrl = url.resolveScript({ scriptId: ‘customscript_jj_sl_ctr_task_crt’, // Your Suitelet script ID deploymentId: ‘customdeploy_jj_sl_ctr_task_ctrt’, // Your Suitelet deployment ID returnExternalUrl: false … Continue reading How to Trigger the Suitelet in Client Script
How to Concatinate values using saved search
Use the Formula Text field and use the following formula with in the formula column {internalid} || ‘_’ || {location}
How to Restrict each the Notify Assignee Change emails in Case record
Go to Setup > Support > Support Preference Then Under the Notification subtab, uncheck the Nofify Assignees under update subtab Then click save
How to Calculate the due date based on the ticket size of Tasks
function settingDueDateValue(days) { try { let currentDate = new Date(); let dueDate = new Date(currentDate.setDate(currentDate.getDate() + days)) ; let today = new Date(); … Continue reading How to Calculate the due date based on the ticket size of Tasks
Sceduled script for remainders on based on Due Date
/** * @NApiVersion 2.1 * @NScriptType MapReduceScript */ define([‘N/record’, ‘N/search’, ‘N/email’], /** * @param{record} record * @param{search} search * @param{email} email */ (record, search, email) => { /** * Defines constant sender employee */ const… Continue reading Sceduled script for remainders on based on Due Date