无法在新的Netsuite记录中设置布尔字段


Cannot Set Boolean Field in new Netsuite Record

我正在尝试使用Netsuite PHP Toolkit创建一个新任务,将其分配给一名员工,并向该员工发送电子邮件。

我可以成功创建和分配任务,但无法获得要发送的电子邮件。

这是我正在使用的代码:

    $task_data = array(
        'title'=>$request['subject'],
        'assigned'=>new nsRecordRef(array('internalId'=>NETSTUITE_CONF::EMPLOYEE_ID, 'type'=>'employee')),
        'message'=>$request['body'],
        'sendEmail'=>true,
        'startDate'=>date('c', strtotime($request['date_added']))
    );
    $task = new nsComplexObject('Task', $task_data);
    $ret = $ns->add($task);
    var_dump($ret);

哪个输出:

object(nsWriteResponse)#13 (3) {
  ["isSuccess"]=>
  bool(true)
  ["statusDetail"]=>
  NULL
  ["recordRef"]=>
  object(nsRecordRef)#19 (4) {
    ["nsComplexObject_type"]=>
    string(9) "RecordRef"
    ["nsComplexObject_namespace"]=>
    string(49) "urn:core_2010_1.platform.webservices.netsuite.com"
    ["nsComplexObject_fields"]=>
    array(2) {
      ["type"]=>
      string(4) "task"
      ["internalId"]=>
      string(6) "408557"
    }
    ["nsComplexObject_namespaces"]=>
    NULL
  }
}

新任务具有除sendEmail字段之外的所有数据集,SuiteTalk模式浏览器将该字段的类型列为xsd:boolean。我也尝试过发送字符串"true"answers"T",但字段仍然是false。

如何将字段设置为true,以便发送电子邮件?

我在他们的支持论坛上收到了一位netsuite员工的回复,他说:

当前不支持通过web服务添加任务记录sendemail=true 时发送电子邮件

尝试'T'或'F'我刚刚在netsuite的其他地方的另一个布尔字段上做了这件事,这就是我的诀窍。