When we use input field type as the date it’s working initially as mm/dd/yyyy as date format it’ll work perfectly in desktop devices but when we change device like Mobile or iPads when we’re to use that and if we’ve changed that date format as dd/mm/yyyy it’ll not work and it’ll create an issue in… Continue reading How to change date formats in the input type date field
Tag: javascript
Arrays in JavaScript
Arrays — lists of numbers, strings, booleans, or any other data type. Array access — each item in the array can be accessed by its numeric index. JavaScript arrays are zero-indexed. This means that the first item in an array is at position 0. var products = [‘soccer ball’, ‘cleats’, ‘socks’, ‘shorts’]; console.log(products[0]); // ‘soccer ball’… Continue reading Arrays in JavaScript
Conditional Statements in JavaScript
“If condition A is true, let’s follow a set of instructions, otherwise, if it is false, let’s do something else.” Now, let’s consider a conditional statement that actually does something: var inNortherHemisphere = true; var latitude = 40.7; if (latitude > 30 && inNorthernHemisphere) { console.log(“It’s cold in December!”); } else { console.log(“It’s not cold… Continue reading Conditional Statements in JavaScript
Difference between Array and Array of Objects in JavaScript
In this article, we will see the differences between Array and Array of Objects in JavaScript. Array: An Array is a collection of data and a data structure that is stored in a sequence of memory locations. One can access the elements of an array by calling the index number such as 0, 1, 2,… Continue reading Difference between Array and Array of Objects in JavaScript
How to check whether an array includes a particular value or not in JavaScript?
Construction of an array followed by checking whether any particular value which is required by the user is included (or present) in the array or not. But let us first see how we could create an array in JavaScript using the following syntax- Syntax: The following syntax would be helpful for any user for the creation… Continue reading How to check whether an array includes a particular value or not in JavaScript?
How to change results per Page in SCA.
By default in SCA configuration records, it is set to 20. But sometimes we need to reduce the search results instead of a long number of lists we need to separate this by a number of pages. That’s why we have to reduce the search results. For that, you have to use a standard SCA… Continue reading How to change results per Page in SCA.
How we can use two SASS files in a extension
While creating a Extension in SuiteCommerce Advanced we get a default Sass file. But while doing development so much style needed and in one file it’s difficult to find the classes and IDs there. In this case we can create new SASS file and and we’ve to just import that SASS file into main entry… Continue reading How we can use two SASS files in a extension
Filter Unique Values
The Set object lets you store unique values of any type, whether primitive values or object references. With the spread operator, we can use it to create a new array with unique values.
Issue in iterating search results
Scenario: While creating saved searches, after getting its result we may need to iterate the result sometimes after the iteration only one item may show in the console(or any output platform). Solution: The searchResults.run() method need a return true statement to continue the iteration. In Suite script, there is no break statement to break the… Continue reading Issue in iterating search results
Comparing Two dates
Scenario: We have a start date and a Due date and need to a validation where Due date date should be a date after the Start date. Solution: Usually we can use the JavaScript Date() function. But you can’t compare two dates using that. Better approach to make comparison between dates is to use getTime() function. This… Continue reading Comparing Two dates