c# - Save value for a Cash sale with a custom segment field -




i'm trying save cash sale in netsuite, have custom segment field called business unit (scriptid = custbody_cseg2) , need put specific value (internal id = 2 in custom segment).

i'm using following code pretty same have in netsuite's applied cash sale transaction:

selectcustomfieldref selectcustomfieldref = new selectcustomfieldref(); listorrecordref custselectvalue = new listorrecordref(); custselectvalue.internalid = "2"; //custselectvalue.typeid = "286"; <- or whitout doesn't change selectcustomfieldref.value = custselectvalue; selectcustomfieldref.scriptid = "custbody_cseg2"; customfieldref[] customfieldrefarray = new customfieldref[1]; customfieldrefarray[0] = selectcustomfieldref; cashsale.customfieldlist = customfieldrefarray; 

when run code following error:

[code=insufficient_permission] not have permissions set value element custbody_cseg2 due 1 of following reasons: 1) field read-only; 2) associated feature disabled; 3) field available either when record created or updated, not in both cases. 

do know error?

thank much!

as custom field, check access level of field in custom field creation form. may don't have sufficient privilege edit field.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -