Netsuite-将资源分配添加到项目任务

时间:2018-09-18 16:15:09

标签: c# netsuite suitetalk

我有当前的代码段,可以很好地将资源分配记录直接添加到项目中...

//Project ID
RecordRef projectRef = new RecordRef();
projectRef.internalId = "3406";

//Employee / Resource ID
RecordRef allocationResourceRef = new RecordRef();
allocationResourceRef.internalId = "359";

RecordRef allocationTypeHardRef = new RecordRef();
allocationTypeHardRef.internalId = "1";

ResourceAllocation resourceAllocation = new ResourceAllocation();

resourceAllocation.project = projectRef;
resourceAllocation.allocationResource = allocationResourceRef;

resourceAllocation.startDate = Convert.ToDateTime("18-SEP-2018");
resourceAllocation.startDateSpecified = true;
resourceAllocation.endDate = Convert.ToDateTime("19-SEP-2018");
resourceAllocation.endDateSpecified = true;
resourceAllocation.allocationAmount = 19;
resourceAllocation.allocationAmountSpecified = true;
resourceAllocation.allocationUnit = ResourceAllocationAllocationUnit._hours;
resourceAllocation.allocationUnitSpecified = true;
resourceAllocation.allocationType = allocationTypeHardRef;

WriteResponse response = Client.Service.add(resourceAllocation);

有人知道如何将此记录添加到项目中的特定项目任务吗?

非常感谢!

0 个答案:

没有答案