Reference Product Reviews Patch for Reference ShopFlow

Important:

Before applying this patch, apply the patch for Configuration Changes for Custom Records.

To implement this patch, set the permissions for the product-reviews.ss file and modify the ssp_libraries/Models.js file.

Step 1: Set Permissions for ProductReviews.Service.ss File

  1. In NetSuite, go to Documents > Files > File Cabinet.

  2. In the File Cabinet, go to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. -ShopFlow X.Y.Z > Custom ShopFlow > services.

    Important:

    Replace the string, X.Y.Z, with the version of ShopFlow you are using.

  3. Next to product-reviews.ss, click Edit.

  4. Go to the Permission tab and check the Enabled box.

  5. From the Execute as Role list, select SC Product Review.

  6. Check the Run Script Without Login box.

  7. Click Save.

Step 2: Modify the Models.js File

You can edit the file, Models.js, in the NetSuite File Cabinet. See Editing Files in the File Cabinet.

  1. Go to Documents > Files > File Cabinet.

  2. In the File Cabinet, go to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. -ShopFlow X.Y.Z > Custom ShopFlow > ssp_libraries.

    Important:

    Replace the string, X.Y.Z, with the version of ShopFlow you are using.

  3. Create a backup of the file, Models.js.

    Note:

    If Models.js does not exist in the ssp_libraries directory, make a copy from Web Site Hosting Files > Live Hosting Files > SSP Applications > Netsuite Inc. -ShopFlow X.Y.Z > Reference ShopFlow > ssp_libraries > Models.js.

  4. In the Models.js file, find and replace the following line of code with the provided code sample.

    Find the following code:

                    if (this.loginRequired && !session.isLoggedIn())
    {
        throw unauthorizedError;
    } 
    
                  

    Replace it with the following code:

                    if (this.loginRequired && !session.isLoggedIn3())
    {
        throw unauthorizedError;
    } 
    
                  
  5. Save and deploy the file.

Step 3: Confirm Custom Record ID and Access Type

  1. In NetSuite, go to Customization > List, Records & Fields > Record Types.

  2. Click the link for the custom record type, Product Reviews.

  3. On the Custom Record Type page for Product Reviews, confirm that ID has the value, customrecord_ns_pr_review.

  4. Confirm that Access Type has Use Permission List selected.

    If the access type is not correct, select Use Permission List from Access Type.

  5. Click Save to save any changes you made.

  6. Repeat steps 1 to 5 for the following custom record types:

    • Product Reviews Attr. Rating – the ID should be customrecord_ns_pr_attribute_rating and the access type should be Use Permission List.

    • Product Reviews Images – the ID should be customrecord_ns_pr_image and the access type should be Use Permission List.

Related Topics

General Notices