Hi Team, While creating a Sales Order through Sui...
# suitescript
p
Hi Team, While creating a Sales Order through Suite Script 2.0 , we are trying to apply a custom rate% for a Discount Item which has been created with a default %, but we observed that the percentage value is ignored and the rate is treated as an absolute amount. Price level is set to -1 for "Custom" Price Level. While doing this through the Netsuite Interface, it works fine and we are able to set the % but through Suite Script it is not getting recognised. We are using the following to set the percentage rec.setSublistValue({ sublistId: 'item', fieldId: 'rate', value: '20%', line: lineCount }); Please suggest.
b
use setSublistText
p
@battk I tried using the setSublistText but it gives me an error - {"type":"error.SuiteScriptError","name":"INVALID_FLD_VALUE","message":"You have entered an Invalid Field Value 25167 for the following field: item","stack":["anonymous(N/serverRecordService) This is the code that I wrote: rec.setSublistText({ sublistId: 'item', fieldId: 'rate', //value: '20%', text: '20%', //ignoreFieldChange: true, line: lineCount }); Can you let me know where I am going wrong?
b
the item with internal id 25167 is an invalid choice for your sales order
it could be a classification related error (invalid subsidiary) or perhaps here is no active item with internal id 25167