How to resolve SuiteScript 2 Error “please configure inventory detail in line x of the item list”

Description: When we update the items in sales orders or similar records that have inventory items, we might face the above error. By using this solution, we can resolve it. Solution: Remove the inventorydetail value from the sublist record so the configured inventory value will be deleted. refer below code currentRecord is the record that… Continue reading How to resolve SuiteScript 2 Error “please configure inventory detail in line x of the item list”

Custom script for creating Return Authorization from the sales order

Description: We can use this solution to create Return Authorizations from the website for the guest shoppers and users so they can use this script to create RA without logged in. Suitelet: define([“N/record”] /**  * @param {record} record  */, (record) => {   “use strict”;   /**    * Defines the Suitelet script trigger point.… Continue reading Custom script for creating Return Authorization from the sales order

How to abort previous the live order Model API when new API is called

Description: When the LiveOrderModel is called multiple times by an unwanted requests, we can use this solution to abort the previous requests to reduce the API request and response time so the user will get responses quicker than before. JavaScript(Entry Point): extend live order model and update save function. // @method save Override default save… Continue reading How to abort previous the live order Model API when new API is called

How to create a search by Purchase Number search box to search for all the purchases that the customer has made.

Description: We can use this solution to create a Search by Purchase Number search box to sort the purchase order history based on the user-entered criteria. JavaScript: _.extend(OrderHistoryListView.prototype, {           template: jj_order_history_list_tpl,           //initilize function is extended to get the purchase history details from the SuiteScript.  … Continue reading How to create a search by Purchase Number search box to search for all the purchases that the customer has made.

Display ‘Eligible For Return’ or ‘Not Eligible For Return’ products in return authoraization based on custom condition.

Description: We can use this solution to show the products as ‘Eligible for Return’ or ‘Not Eligible for Return’ with custom conditions like personalized product and order date. and made customers only return eligible items. JavaScript: _.extend(ReturnAuthorizationFormView.ReturnAuthorizationFormView.prototype, {           template: jj_return_authorization_form_tpl,           //initListHeader function is updated as… Continue reading Display ‘Eligible For Return’ or ‘Not Eligible For Return’ products in return authoraization based on custom condition.

Show Standard or express shipping methods based on the inventory item records in checkout.

Description: We can customize the shipping methods to show when the express inventory item is present in the order; if it is not present, we can show the standard shipping method using this solution. Dependency: custitem_jj_express_shipping // field id for determining if an item is an express shipping item or not. SuiteScript: define(‘JJ.Express.Shipping’ , [… Continue reading Show Standard or express shipping methods based on the inventory item records in checkout.

Add custom images to website’s Checkout and Myaccount section using “ProductLine.Common.Image” Model

Description: We can add customized product images to the inventory item on the SCA websites Checkout and My Account section using “ProductLine.Common.Image”standard model file. JavaScript: //updating the Do It Best images in the TransactionLineModel model file by extending filterImages and getThumbnail functions       _.extend(TransactionLineModel.prototype, {         filterImages: function filterImages(itemImagesDetail, imageOptionFilters)… Continue reading Add custom images to website’s Checkout and Myaccount section using “ProductLine.Common.Image” Model

Add custom images to Inventory item thumbnail and previews images using Item Keymapping Model In PDP and PLP pages

We are showing the URL images that are added in the item record, images are stored in the custitem_jj_dib_image1_tfll403, custitem_jj_dib_image2_tfll403 and custitem_jj_dib_image3_tfll403 are the field id’s. JavaScript: Entry Point: //creating getDoItBestImages function to get the Do It Best images if the Item is Synced to Do It Best.       let getDoItBestImages = item… Continue reading Add custom images to Inventory item thumbnail and previews images using Item Keymapping Model In PDP and PLP pages

How to resolve the issue of URL is not navigating to PDP page when we click on image or name of Related items slider in PDP and cart

Some time In specifically iPhone, iPad and android devices the URL will not navigate when click on related items slider or similar sliders we can use this solution to resolve the issue. Solution: Sometime the issue accrued due to not using full URL instead we have used the extended URLs like “/test-item-1” , “/test-item-2” rather… Continue reading How to resolve the issue of URL is not navigating to PDP page when we click on image or name of Related items slider in PDP and cart