Does anyone know why I can access header level (cu...
# suitecommerce
j
Does anyone know why I can access header level (custbody) custom fields from scriptable cart, but not custom line item fields (custcol) in SCA? It's quite strange. I'm getting the record using currentRecord.get(), and none of the custom columns are showing up even though they are available when logging in as the customer and creating a sales order through the form in NetSuite UI (but same form in SCA doesn't allow access to the line-level custom fields)
s
I'm struggling to understand exactly what the problem is. Are you talking about custom fields for items in the order history?
What exactly are you trying to do? What user interaction are you talking about? Where in the user journey is the customer?
j
I am trying to access line level custom fields when a user is adding or removing items from the cart, but no custcol fields are accessible from the scriptable cart when attempting to do so
s
They are definitely accessible. Have you set them up so that they are accessible in that context?
And presumably you're doing something like this:
nlapiGetCurrentLineItemValue('item', 'custcol_mycol')
in the validateLine function?
j
I'm trying to access the column through SS2.0 like so under sublistChanged:
context.currentRecord.getSublistValue({
sublistId: 'item',
fieldId: 'custcol_example',
line: 0
});
s
I'm confused. You said you were using scriptable cart?
SS 2.0 can't be used in scriptable cart
j
Yeah I'm using 2.0 in scriptable cart, so it must only have limited functionality for this script type then I suppose?
s
Sorry, I got confused -- I forgot that you can use 2.0 for some parts of it. In this case, I can't be useful as I've not written any 2.0 scriptable cart scripts 😅. Sorry
j
No problem!
c
What release did 2.0 become useable with scriptable cart?