Category: SuiteScript Functions
SuiteScript Functions related articles will be posted in this category
Item Location Configuration search
// search for item location configuration using itemid and get the supplytype of the location function itemLocConfigSearch(itemId){ try { let supplytypeItemobj = {}; let itemSearch = search.create({ type: record.Type.ITEM_LOCATION_CONFIGURATION, filters: [ [‘item’, ‘is’, itemId] ], columns: [ search.createColumn({name: “supplytype”, label: “Supply Type”}) ] }); let searchResultCount = itemSearch.runPaged(); searchResultCount.pageRanges.forEach(function (pageRange) { let myPage = searchResultCount.fetch({… Continue reading Item Location Configuration search
Node Functions
Node functions
The function to check purchase order is drop ship/special order
The function to check purchase order is drop ship/special order
Function to remove spaces
Function to remove spaces
Escape special characters in a text
Escape special characters in a text
Saved search to get the Location OnHand from Item record
Get today’s date in a different timezone using the search
Get today’s date in a different timezone using the search
Function to check whether the account is production or not
Function to check whether the account is production or not
Split URL String to get each parameter value in the JavaScript
function splitData(){ try { var value=”journreference=123line=A&destination=China&operator=Belbo&departure=104″; // split the string with these characters var parts = value.split(/[#\?&]/g); // find the piece with the key “destination” var filteredParts = parts.filter(function (part) { return part.split(‘=’)[0] === ‘destination’; }); // split the value and key, and grab the value [1] if (filteredParts) { var splitValue = filteredParts[0].split(‘=’)[1]; }… Continue reading Split URL String to get each parameter value in the JavaScript