現金販売をnetsuiteに保存しようとしていますが、ビジネスユニット(ScriptId = custbody_cseg2)というカスタムセグメントフィールドがあります。 (カスタムセグメントの内部Id = 2)。私はかなり我々がNetSuiteの助けに持っていますが、現金売却取引に適用されたものと同じである次のコードを使用していカスタムセグメントフィールドを使用して現金販売の価値を保存する
:
SelectCustomFieldRef selectCustomFieldRef = new SelectCustomFieldRef();
ListOrRecordRef custSelectValue = new ListOrRecordRef();
custSelectValue.internalId = "2";
//custSelectValue.typeId = "286"; <- with or whitout doesn't change
selectCustomFieldRef.value = custSelectValue;
selectCustomFieldRef.scriptId = "custbody_cseg2";
CustomFieldRef[] customFieldRefArray = new CustomFieldRef[1];
customFieldRefArray[0] = selectCustomFieldRef;
cashSale.customFieldList = customFieldRefArray;
私は、私は次のエラーを取得するこのコードを実行すると:
[Code=INSUFFICIENT_PERMISSION] You do not have permissions to set a value for element custbody_cseg2 due to one of the following reasons: 1) The field is read-only; 2) An associated feature is disabled; 3) The field is available either when a record is created or updated, but not in both cases.
エラーの原因を知っている人はいますか?
ありがとうございました!
私はこのコードを管理者ユーザーで実行していますが、同じユーザーであっても、現金販売作成フォームでこの値を設定できます。 –