Skip to main content

I am creating a New Record. I created a condition to set the DateTime field to Today.  My end users tell me that it used to show todays date and current time.  It is now setting the date to Today’s date but the time is always showing 12:00.  It makes sense that Today is not Now() and thus would set the date but not the time.  But I am told that it used to do both (I honestly don’t remember if it did or not but multiple users claim it did).  

Regardless, it would be cool to add NOW() as an option on DateTimeFields.  Is there a best case way of setting a datetime field to Now() but allowing any date or time to be entered if necessary.  Thank you!

Hi Rich,

It is suppose to be NOW() when u select today on a date/time type of field.

I’m on Skuid V8.13 and it works fine.

Looking in releases I see the latest release has a note that this issue has been fixed

 Rockaway Point Release - Iteration 10: 0SKUID-2387] - “TODAY” resolves to midnight instead of Current Time

If not on latest version, please update and it should work



Thanks Dave I was on 8.15.7 and had the bug so I just upgraded to 8.15.8

!(https://us.v-cdn.net/6032350/uploads/attachments/RackMultipart20160829-30222-rb20yv-ScreenClip 6 inline.png “Image https//d2r1vs3d9006apcloudfrontnet/s3_images/1475554/RackMultipart20160829-30222-rb20yv-ScreenClip__6__inlinepng1472508962”)

I logged out and logged back in for good measure and am still seeing the same behavior.


12:00 am is still listed but it is 4:17pm


!(https://us.v-cdn.net/6032350/uploads/attachments/RackMultipart20160829-35051-9pcibp-ScreenClip 1 inline.png “Image https//d2r1vs3d9006apcloudfrontnet/s3_images/1475556/RackMultipart20160829-35051-9pcibp-ScreenClip__1__inlinepng1472509038”)

Here is the back end

!(https://us.v-cdn.net/6032350/uploads/attachments/RackMultipart20160829-110755-1gxkkuj-ScreenClip 5 inline.png “Image https//d2r1vs3d9006apcloudfrontnet/s3_images/1475557/RackMultipart20160829-110755-1gxkkuj-ScreenClip__5__inlinepng1472509052”)

And the filter set to “TODAY”.


Thanks for the reply Dave. I may be doing something wrong but it appears to still have the same behavior somewhere between 8.13 and 8.15.8.


Rich,

I updated to 8.15.8 in my developer org and I am seeing the same behavior.  Setting a condition on a date/time field to ‘TODAY’ only sets the date.  The time stays at 12AM.

I’ve experienced this with a client as well.  We’ve been editing the XML and manually update the condition from ‘TODAY’ to ‘NOW’.

Thanks,

Bill


When I tried that Bill I got the correct time, but I also got the following error:
“AND(Date_Time__c = NOW) LIMIT 1 Error:expecting a colon, found ‘NOW’”

Are you getting this error?


Rich,


I am not getting this error. Here is a sample of the xml for the condition:


                <condition type="fieldvalue" value="NOW" enclosevalueinquotes="false" field="ReminderDateTime"/>

Are you querying the model after saving it?


Thanks,


Bill


Hi Rich and Bill~

Thanks for notifying us of these issues. Our devs are aware of the issue and we will update this post when a release is available that fixes this issue. 

Thanks for your patience as we get this resolved!
Karen


Hi~

The NOW vs. TODAY issue has been fixed in the Brooklyn release such that NOW is a timestamp of the current time and TODAY is midnight on the current day. 

Thanks!
Karen


This is not the behavior I am seeing.


Rockaway with a field update action on a date/time field gives me this console error:


"Visualforce Remoting Exception: Invalid integer: " Object { statusCode: 400, type: “exception”, tid: 3, ref: false, action: “skuid.RemotingStubs”, method: “save”, message: "Invalid integer: ", where: “”, data: Array1], vfTx: true, 2 more… }



Brooklyn (9.3) doesn’t have NOW in the choices, so I have to pick Today again.


It doesn’t throw an error, but sets the time to midnight.


So, can NOW be added to the field update options in Brooklyn, and can Rockaway be fixed so our production orgs will be working?


Karen,


I just updated my developer org. with Brooklyn Iteration 1.1 (Skuid 9.3). I am still seeing the same problem where using the ‘TODAY’ option for a date/time field condition sets the time to ‘12:00:00AM’. Do I need to do something beyond updating my version of Skuid?


I can confirm that manually editing the XML and replacing the ‘TODAY’ with ‘NOW’ still works to set the date and time with the current value.


Here is the page xml that I used to reproduce this issue:


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" useviewportmeta="true" showsidebar="true" showheader="true" tabtooverride="Task">    <models>
<model id="Task" limit="1" query="false" createrowifnonefound="true" datasource="salesforce" sobject="Task" type="">
<fields>
<field id="Subject"/>
<field id="ReminderDateTime"/>
<field id="ActivityDate"/>
</fields>
<conditions>
<condition type="fieldvalue" value="TODAY" enclosevalueinquotes="false" field="ActivityDate"/>
<condition type="fieldvalue" value="TODAY" enclosevalueinquotes="false" field="ReminderDateTime"/>
</conditions>
<actions/>
</model>
</models>
<components>
<pagetitle model="Task" uniqueid="sk-3zNrFm-91">
<maintitle>
<template>New {{Model.label}}</template>
</maintitle>
<subtitle>
<template>{{Model.labelPlural}}</template>
</subtitle>
<actions>
<action type="savecancel" afterCancel="/{{Model.KeyPrefix}}/o" afterSave="/{{Id}}" rollbackonanyerror="true"/>
</actions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Task" mode="edit" uniqueid="sk-3zNrFm-92">
<columns>
<column width="50%">
<sections>
<section title="Basics">
<fields>
<field id="Subject"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="Additional Info" collapsible="no">
<fields>
<field id="ReminderDateTime"/>
<field id="ActivityDate" valuehalign="" type=""/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Thanks,


Bill


I also had this issue and had to manually change it to “NOW”. Working fine now.


Hi Skuid Community~

Thank you for your patience as we addressed this bug. This issue has been resolved in the
Brooklyn Update 1 which is now available from the Skuid Releases page.

As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!

StephenSells perhaps you can shed some light, but I just upgraded my sandbox package to Brooklyn 10.0  and then updated my Date/Time field values from TODAY to NOW and am still seeing 12:00 AM as the time of the action?


This is the difference between TODAY and NOW:



Today will go to 12:00AM

Now will do the current time.


I have updated my XML from TODAY to NOW and it is still returning (to Salesforce) 12:00 AM rather than the current time.


I’d highly recommend changing it declaratively rather than just in the XML. Rarely is it best to go straight to the XML. Some functions do more than just change the value name.


I actually have two different pages of the same build (cloned) and have made changes declaratively in one and XML in the other. In both cases, I have had the same result.


Can you share the XML on a simple reproduction page? I’d love to see what you’re doing. Preferably on standard objects


Reply