有没有办法在从同一子列表中选择下拉值时禁用子列表字段。 SuiteScript 2.0 getSublistField 方法不起作用
Is there a way to disable a sublist field while choosing dropdown value from the same sublist. SuiteScript 2.0 getSublistField method not working
我需要在从下拉列表中选择选项时动态禁用列表中的其中一个。示例我将主要类别值作为住宿,在同一行中有一个字段作为停留天数。 stay 字段在创建时被禁用。我只想在下拉菜单中选择住宿时启用此订单项字段。
我已经尝试使用 getSublistFiled 来获取停留字段引用,但它显示错误并且也被禁用。
var fld1 = currentRecord.getSublistField({
sublistId: 'recmachcustrecord_expse_clm_itm_parent',
fieldId: 'custrecord_expse_clm_itm_sub_catgry',
line: currentLine
});
fld1.isDisabled = true;
在此先感谢您的帮助!
您正在使用 currentRecord.getCurrentSublistValue。你应该使用 currentRecord.getSublistField.
我设法通过 nlapiDisableLineItemField 解决了这个问题。
nlapiDisableLineItemField('recmachcustrecord_expse_clm_itm_parent','custrecord_expse_clm_itm_stay', false);
我需要在从下拉列表中选择选项时动态禁用列表中的其中一个。示例我将主要类别值作为住宿,在同一行中有一个字段作为停留天数。 stay 字段在创建时被禁用。我只想在下拉菜单中选择住宿时启用此订单项字段。
我已经尝试使用 getSublistFiled 来获取停留字段引用,但它显示错误并且也被禁用。
var fld1 = currentRecord.getSublistField({
sublistId: 'recmachcustrecord_expse_clm_itm_parent',
fieldId: 'custrecord_expse_clm_itm_sub_catgry',
line: currentLine
});
fld1.isDisabled = true;
在此先感谢您的帮助!
您正在使用 currentRecord.getCurrentSublistValue。你应该使用 currentRecord.getSublistField.
我设法通过 nlapiDisableLineItemField 解决了这个问题。
nlapiDisableLineItemField('recmachcustrecord_expse_clm_itm_parent','custrecord_expse_clm_itm_stay', false);