This topic contains 0 replies, has 0 voices, and was last updated by rnedelkow 6 years, 5 months ago.

  • Author
    Posts
  • #17988

    rnedelkow

    Upcoming Enhancements to DATETIME Field Queries
    This notice is to inform you of upcoming changes to the SuiteScript 2.0 Record.getValue(options) and format.parse(options) methods used to return string values for DATETIME fields. These enhancements will be released in production and sandbox accounts with the upgrade to 2018.2. They will increase the consistency and reliability of DATETIME field queries.

    Currently, the Record.getValue(options) method returns a string for DATETIME fields, as shown in the following example:

    Code:

    myString = ‘Date is: ‘ + record.getValue({fieldId: ‘datechanged’}); // “Date is: 1/20/2018 12:34 am”
    The format.parse(options) method for DATETIME fields silently fails when the input string does not include seconds.

    After your account is upgraded to 2018.2:The Record.getValue(options) method will return a JavaScript Date object.
    The Format.parse(options) method for DATETIME will no longer fail when the input string does not include seconds.
    Recommended ActionsReview your scripts that were created prior to 2018.2 to find those that use the Record.getValue(options) method to return a string value for DATETIME fields. If you want these scripts to continue to return string values in 2018.2, you must update them to use the Record.getText(options) method.
    In any scripts that you create after your account is upgraded to 2018.2, use the Record.getText(options) method to return a string value for a DATETIME field. The following example shows this usage:

    Code:

    myString = ‘Date is: ‘ + record.getText({fieldId: ‘datechanged’}); // “Date is: 3/27/2017 9:55:38am”
    Test scripts when the 2018.2 Release Preview is available to ensure that you can identify and resolve any issues related to these updates prior to your account’s update to 2018.2.
    You may be unable to modify scripts provided by a partner. If you encounter this, contact the partner and request that they make the appropriate changes.

    The list of fields affected by this change is available in SuiteAnswers, ID 74544.

    If you have additional questions, please contact NetSuite Customer Support.

    Thank you,

    The NetSuite Team

    FOLLOW US

       

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Privacy Statement | Trademark
    This is a cached copy. Click here to see the original post.

You must be logged in to reply to this topic.