Jump to content

Script for Current Date/Time in Bulk Edit Update

Recommended Posts

I use some script to get the user computer's date and enter it into a text field as a TimeStamp. I have it go into a text field and not a date field because I use that value to concatenate with other text fields for display purposes. I also use the script below so I can get the user computer date because users are all over the globe and setting a time zone in localization doesn't work (since everyone is on a different time zone). 

This all works fine in the Details page, upon update. But I also need the script to fill the Bulk Edit selected records field. I'm wondering if it's because Bulk Edit is designed for multiple records that the script doesn't work? 

I've tried the text filed for the date (Comments_Actual_Read_Date) as either hidden or text in Bulk Update but it's not updating. I think if Hidden the field should update without having the left hand check box checked. Here's the code in the footer of Bulk Update: 

 /* Declaration and initialization */
 Stamp = new Date();
 var v_TimeStamp;
 Hours = Stamp.getHours()
 Mins = Stamp.getMinutes();
 Secs = Stamp.getSeconds();

 /* Attach a prefix with digit '0' if the minutes is less than 10. */
 if (Mins < 10) {
   Mins = "0" + Mins;
 /* Construct the value of the v_TimeStamp variable in the format m/d/yyyy hh:mm */
 v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear() + ' ' + Hours + ":" + Mins + ":" + Secs);



Any help would be great- thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...