Announcements
No record found.
Hi All,
How do i go about adding a duration field to a time field.
For example one selects duration of 45 mins and time is 10:00 .. I want records this as 10:45.
Thanks,
*This post is locked for comments
A duration field is a whole number field that contains in the background a value in minutes.
To get the end date / time you can use either a workflow, flow or plugin to addminutes(duration) to the starting date field.
duplicate
you cant add a duration to a time field using a workflow. The duration field is locked is locked down.
Any references to help me with Java Script / Plugin ?
Hi,
go through the similar scenario community.dynamics.com/.../221343
you can refer below post on how to update a duration field using JS. But , if you are using CRM 9.0 above, remember using the execution context.
community.dynamics.com/.../802826
Try this-
===================
function setProgramEnd() {
var ProgramStartDate = Xrm.Page.getAttribute("new_programstartdate").getValue();
var ProgramDurationInMinutes = Xrm.Page.getAttribute("new_programduration").getValue();
var ProgramEndDate = new Date(ProgramStartDate.getTime() + ProgramDurationInMinutes * 6e4);
Xrm.Page.getAttribute("new_programenddate").setValue(ProgramEndDate);
}
==================
Hope this helps.
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
JS-09031509-0 3
AS-17030037-0 2
Mark Eckert 2