I need some help troubleshooting this error which ...
# suitecommerce
a
I need some help troubleshooting this error which I see in the Network tab of my browser console when I try to Continue from the first checkout page when logged into SuiteCommerce as a customer:
Copy code
{
  "errorStatusCode": "400",
  "errorCode": "ERR_WS_FIELD_NOT_SUPPORTED",
  "errorMessage": "You have attempted an unsupported action."
}
The errorMessage appears in a little pink error notification in one place on the checkout page, or three places if it's one-page checkout. It doesn't really tell me much, and I don't see any Server Script Logs about it when I search them. Whatever is throwing this error seems to also be preventing the user from advancing to the next checkout step.
1
v
Is it getting thrown by the LiveOrder.Service? I would think it could be a client script deployed over the Sales Order that could be the culprit
a
Network tab shows the error is the response from /scs/extensions/SuiteCommerce/CustomFields/1.1.4/services/Checkout.Service.ss
I suspected the custom fields but I couldn't find anything wrong with the values I was sending in the form submit that happens when the user clicks "Continue" at the bottom to get to the next checkout step.
v
oh ok that’s used by the Commerce extension from netsuite for custom fields, so it might be when trying to update a field that the client script is executed. You can check if you have ” SCRIPTABLE CART AND CHECKOUT” checked in your website record and if you are in a staging or sandbox you can see if you uncheck that if it works (after opening it in incognito window)
a
Here's the payload of the submit request:
Copy code
{
  "module": "order_wizard_shipmethod_module",
  "position": "AFTER",
  "fields": [
    {
      "internalid": "custbody_checkout_specshipinstr_header",
      "position": "After",
      "module": "Shipping Method",
      "type": "Header",
      "label": "Special Shipping Instructions",
      "placeholder": "",
      "mandatory": false,
      "maxfieldlength": null
    },
    {
      "internalid": "custbody_checkout_specshipinstr",
      "position": "After",
      "module": "Shipping Method",
      "type": "Text Area",
      "label": "Please note any special instructions for your delivery address:",
      "placeholder": "",
      "mandatory": false,
      "maxfieldlength": null
    },
    {
      "internalid": "custbody_checkout_deliveryhoursfrom",
      "position": "After",
      "module": "Shipping Method",
      "type": "Free-Form Text",
      "label": "Please confirm your delivery hours:",
      "placeholder": "Morning, e.g. 8:00 AM",
      "mandatory": false,
      "maxfieldlength": null
    },
    {
      "internalid": "custbody_checkout_deliveryhoursto",
      "position": "After",
      "module": "Shipping Method",
      "type": "Free-Form Text",
      "label": "",
      "placeholder": "Afternoon, e.g. 5:00 PM",
      "mandatory": false,
      "maxfieldlength": null
    },
    {
      "internalid": "custbody_checkout_liftgaterequired",
      "position": "After",
      "module": "Shipping Method",
      "type": "Check Box",
      "label": "Is lift-gate required?",
      "placeholder": "",
      "mandatory": false,
      "maxfieldlength": null
    },
    {
      "internalid": "custbody_checkout_custpickup_instr_header",
      "position": "After",
      "module": "Shipping Method",
      "type": "Header",
      "label": "Pick-up instructions (will be included on your order confirmation):",
      "placeholder": "",
      "mandatory": false,
      "maxfieldlength": null
    },
    {
      "internalid": "custbody_checkout_custpickup_instr",
      "position": "After",
      "module": "Shipping Method",
      "type": "Text Area",
      "label": "",
      "placeholder": "",
      "mandatory": false,
      "maxfieldlength": null
    }
  ],
  "custbody_checkout_specshipinstr": "",
  "custbody_checkout_deliveryhoursfrom": "",
  "custbody_checkout_deliveryhoursto": "",
  "custbody_checkout_liftgaterequired": false,
  "custbody_checkout_custpickup_instr": ""
}
Now, there is at least one more field on the form that is not appearing in the submit request, and that field is custbody_checkout_hasreadtcs
OK I'll try the scriptable cart and checkout checkbox...
Actually it is already unchecked.
v
I’m thinking of scripts because of the FILE NOT SUPPORTED error, if it was a field it shouldn’t have a file involved
oh ok so it’s not that
ohh sorry i read file not supported not field
haha
a
I do have the online forms set to custom forms that have clientside scripts attached, but the clientside scripts don't do anything except set a test variable to a string value, and that variable isn't used anywhere. I came in after these were added so I don't know why we have them, but I don't think it's doing anything in the form clientscript, and Scriptable checkbox is unticked.
v
does custbody_checkout_hasreadtcs have the checkbox “Web Store” checked?
all of the fields you are using actually
a
I read somewhere that certain field types are not supported in SuiteCommerce, but these are fields I was using last time I built this web store, and was not getting that error at this time (I have built this web store a few times but each time before in Sandbox but never created it in Production, and had to refresh the sandbox a few times, and there's no good Web Store backup and restore method in place that I know of)
I don't think those fields like custbody_checkout_hasreadtcs and the others exist outside the Custom Fields extension. Do they need to?
v
Yes, there should be custom body fields associated for each of those fields in the custom field extension
Customization > List, Records & Fields > Transaction Body fields
a
Well that might be why it's not working 🙂 I'll go make sure they have custbody fields existing in the custom Transaction Body Fields.
v
the id should match exactly so when creating the body field make sure to create it without the custbody part since that is added by netsuite
👍 1
a
That fixed it! I'll need to add that to my list of things that need to be re-created if we refresh the sandbox before deploying to production again.
Thank you very much for your help.
v
awesome! i’m glad it worked
1