You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

default values in datetime field in VBS as per timezone

edited Jul 8, 2026 11:22AM in Visual Builder Studio 1 comment

Summary:We are trying to default date in redwood document of records in Date From field. In business rules we have used his expression [[ (new Date(new Date().getTime())).toISOString() ]] .The date is defaulting . We are operating in sydney timezone. After submission of document of records it is reverting to UTC date.

Then we tried to use advanced expression java script to default as per timezone. In UI it shows the date correctly but after submission it reverts back to UTC date.

/* eslint-disable dot-notation */
define([], () => {
'use strict';

/**

  • Default value expression for documentRecords.DateFrom
  • @param {object} context
  • @return {string}
    */
    function getDocumentRecordsDateFrom(context) {
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!