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条)

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效