I'm at wits end. Does anyone know of issues using the order methods to set custom fields throwing errors? I am in the checkout process (logged in) and trying to set a main body custom field on the order. The custom field is set up for web store, is hidden (though also tried displaying normal to no avail), and is set to the main section (not that it should matter).
Is there only certain points in the checkout process when setting custom fields works? When I load the checkout page (step 1), I can read the custom fields fine in the cart.ss service however if I attempt to set a custom field, it throws an 'Unexpected Failure' (which is absolutely useless for me to troubleshoot). The error code is completely unrelated and seems to refer to the Terms and Conditions setting issue which has no relevance at the beginning of the checkout process.
My code in the cart.ss service:
var order = nlapiGetWebApplication().getShoppingSession().getOrder(); var custfields = {"custbody_timer","1234567890435678"}; order.setCustomFieldValues(custfields); Throws the following error: [ERR_WS_SET_TERMSCONDITIONS] - Unexpected failure
Can anyone enlighten me on what I may not be doing correctly or assuming incorrectly? This is a painful trial and error so hoping someone else who has already been through the pain can help.