dpnzf48660 2012-08-29 14:49
浏览 41
已采纳

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

I am trying to use the Netsuite PHP Toolkit to create a new task, assign it to an employee and have an email sent to that employee.

I can successfully create and assign the task, but can't get the email to send.

Here is the code I'm using:

    $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);

Which outputs:

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
  }
}

The new task has all the data set except the sendEmail field, which the SuiteTalk Schema Browser list the type as xsd:boolean. I have tried sending the strings "true" and "T" as well, but the field remains false.

How can I set the field to true, so that the email is sent?

  • 写回答

2条回答 默认 最新

  • dongna2498 2012-08-30 15:57
    关注

    I got a response from a netsuite employee on their support forum saying:

    Adding a task record via web services does not currently support sending of the email when sendemail=true

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料