Announcements
Hello,
I would like to create a field, which shows date and time of clicking "Sales ready" field. So, when user clicks the field "Sales ready", the new field shows the date.
Should I use workflow? Calculated or rollup field?
Thanks in advance
Hi Iza,
Do you mean to show click date when onclick of one button?
You could set custom field as Date and Time Data field and bind following functions on mentioned "Sales ready" in ribbon workbench
function SetDays() {
var currentDate = new Date();
//currentDate.setHours(currentDate.getHours()+5);
Xrm.Page.getAttribute("customfield").setValue(currentDate);
}
Please refer to Milan Pincar's suggestion for more details in the following post.
community.dynamics.com/.../setting-date-and-time-field-using-javascript
stackoverflow.com/.../dynamics-crm-javascript-onclick-function-for-date-change
Regards
Johnny
Hi Johnny,
Thanks for your respond. Unfortunately, I've never used Ribbon Workbench. Is it possbile to do it in another way?
Iza
You mentioned the field display current date time when customer click "Sales ready" field.
From my point of view , this Sales Ready should be more like a button which help trigger onclick event.
Workflow is usually triggered by entitiy data creation or modification which is regardless of onclick event. And Business Rules is mainly triggered by field attribute modification. Calculated field could display current data time while you still need to use JS function to call onclick event.
So I recommend ribbon button to call the function and realize your request.
Hope above would help.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
ManoVerse 143 Super User 2026 Season 1
Hamza H 142 Super User 2026 Season 1
11manish 121