Search code examples
servicenetsuitesuitecommerce

SuiteCommerce Advance: Unable to get the Free Shipping Rule Rate 'Insufficient permissions' for Custom Service


  1. We tried loading shipping item data with 'nlapiLoadRecord', Currently we have two methods available Standard & Express. We tried to load data for standard method as below in Script Debugger.

    ​var standard = nlapiLoadRecord('shipitem',3);

We are getting all fields of standard shipitem in Script Debugger, then we are fetching shipping rule value with

var standard_amount = standard.getFieldValues('freeifordertotalisoveramount');
  1. Then we tried to load these same data using nlapiLoadRecord in our custom SuiteScript Model, we tried to call this method in our custom ShippingDetails.Model, and tried to fetched the data on cart page but it is giving us 'Insufficient permissions' error massage. Please see below attached screenshot. nlapiLoadRecord('shipitem',3); does not allow us to load data on front end.

enter image description here


Solution

  • Basically this is not case with your code, as you are trying to load shipping rate using SuiteScript Service and model this is perfect.

    var standard = nlapiLoadRecord('shipitem',3); var standard_amount = standard.getFieldValues('freeifordertotalisoveramount');

    This is completely related with user's permission i.e Roles Under Setup-->User/Roles-->Manage Roles you are trying to fetch data of 'shippingitem' in this case you must need to check different permission

    1. Check your Script Service is enabled, enabled for with out login in NS back end

    Most Imp: 2. Check shipping item is added in permission under List i.e the role which you are using for Service, for that role you must need to set shipping item See below screen shot you will get more idea.

    enter image description here enter image description here