Hi, how to set value in Promotion line while creat...
# suitescript
p
Hi, how to set value in Promotion line while creating sales order, i have tried
Copy code
nlapiSelectLineItem('promotions')
nlapiSetCurrentLineItemValue('promotion','big friday sale')
it selects the Promotion line but doesn't selects the value
r
Please cross check you entered promotion as sublist id, it should be like this:
nlapiSetCurrentLineItemValue('promotions',''filedid',big friday sale')
nlapiSetCurrentLineItemValue(type, fldnam, value, firefieldchanged, synchronous)
p
nlapiSetCurrentLineItemValue('promotions',''filedid',big friday sale')
this gives missing ) error and when i try this
nlapiSetCurrentLineItemValue('promotion','filedid','big friday sale')
it does nothing
b
second parameter to nlapiSetCurrentLineItemValue should be the id of the field you are trying to set
p
tried that didn't work
b
what field are you trying to set
p
Promotions line
the first field is a select
message has been deleted
b
you set select fields by value with the internal id number
use nlapiSetCurrentLineItemText if you want to set the select with the text value
looking at what you have tried in the console, you probably want to read the documentation closer. you are not using the correct values in the correct places