我如何通过WSDL更新NetSuite部门isInactive?

我如何通过WSDL更新NetSuite部门isInactive?,netsuite,Netsuite,我试图通过WSDL更新NetSuite部门,但在更新IsInActivity时遇到问题。下面是我的C语言代码: 然后叫 var result = ServiceClient.update(record); 部门的部门在NetSuite上处于非活动状态,不会检查我是否将其设置为true或false。我做错了什么?您需要首先.get()记录,设置一些属性,然后.update()记录。以下是对我有效的方法: var ns=new NetSuite.NetSuiteService(); //已跳过pa

我试图通过WSDL更新NetSuite部门,但在更新IsInActivity时遇到问题。下面是我的C语言代码:

然后叫

var result = ServiceClient.update(record);

部门的部门在NetSuite上处于非活动状态,不会检查我是否将其设置为true或false。我做错了什么?

您需要首先
.get()
记录,设置一些属性,然后
.update()
记录。以下是对我有效的方法:

var ns=new NetSuite.NetSuiteService();
//已跳过passport信息
var departmentRef=新的RecordRef
{
internalId=“1”,
类型=RecordType.department,
指定的类型=真
};
var响应=ns.get(departmentRef);
var部门=响应。记录为部门;
department.isInactive=true;
ns.更新(部门);

您忘记设置
IsInActivitySpecified

试试这个:

var record = new com.netsuite.webservices.Department
{
 internalId = dp.InternalId,
 isInactive = dp.InActive,
 isInactiveSpecified = true
};
var record = new com.netsuite.webservices.Department
{
 internalId = dp.InternalId,
 isInactive = dp.InActive,
 isInactiveSpecified = true
};