Reputation: 25
Can anyone tell me what the error SSS_NOT_YET_SUPPORTED means in Netsuite? I'm trying to modify the sales order form so that it can handle promotions that have lists of individual prices instead of percentages/price levels. I'm pretty sure that this error is coming from the part of my code that is trying to remove promotion prices from line items if that promotion is de-selected, as follows:
if (_Promotions[1] != null){
for (var a = 1; a < nlapiGetLineItemCount("item")+1; a++){
nlapiSelectLineItem("item", a);
if (_Promotions[1].getFieldText("name") == nlapiGetCurrentLineItemText("item", "custcol_promo_used")){
nlapiSetCurrentLineItemValue("item", "price", nlapiGetFieldValue("custbody_salesorder_pricelevel"));
nlapiSetCurrentLineItemText("item", "custcol_promo_used", "");
}
nlapiCommitLineItem("item");
}
}
e.g. If there was a promotion applied, loop through the line items. If that promotion was applied to that line item, set its price back to the regular price level and set the text of the "promo_used" field to the empty string, then commit the line item.
I did some logging and the error seems to be in the second if block, but I'm not sure how to interpret it.
Thanks!
Upvotes: 0
Views: 1253
Reputation: 15447
You are calling one of the *Text methods on the client. These methods have been "NOT YET SUPPORTED" for years.
_Promotions[1].getFieldText("name")
will error though if you get past thatnlapiSetCurrentLineItemText
would throw it as well
A couple of notes:
It looks like you have loaded individual promotions. You would be much better off doing that with a search and if you search you can use nlobjSearchResult.getText on the client. Also the following should work on the client or server (dynamic mode):
nlapiSetCurrentLineItemValue('custcol_promo_used', null);
Upvotes: 3