Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8500719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:01:07+00:00 2026-06-11T01:01:07+00:00

I am trying to use the Netsuite PHP Toolkit to create a new task,

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:01:08+00:00Added an answer on June 11, 2026 at 1:01 am

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying use eco for client-side templating. I have multiple .eco templates that I'd
I am trying use a from a multi-dimensional array that I create in another
I have a regex that I'm trying use to validate against strings. Trying to
I have a 3rd party DLL that I am trying to use in a
I am trying use gem tire to search in my application. I have tables
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
Hi I'm trying use a datepicker on a field I have. I'm trying to
I have been trying use the edit_post_link() function to contain an image. All of
I have to create specific table in PHPTAL. I have array like that: $tab

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.