SBX - Search With Button

SBX - Forum Post Title

Use end of Timer for start workflow

Microsoft Dynamics CRM Forum

Alexandr Jermolajev asked a question on 9 Nov 2018 6:26 AM
My Badges

Question Status

Verified

Hi,

i tried to use Timer in Dynamics 2016 as solution for our process of reservation products. 

The user fill date field and that execute start of the Timer. In another field i have "Status of reservation" and with the end of Timer i need to change the "Status of reservation".

Main problem for me is that Timer cannot be used by Business Rules or Workflows.

Is there any other way please? 

Thanks for any advice.

Reply
Flydancer responded on 9 Nov 2018 6:47 AM
My Badges

Hi Alexandr,

have a look at this article: www.catapulterp.com/set-timer-in-crm-for-case-management

Reply
Alexandr Jermolajev responded on 9 Nov 2018 7:18 AM
My Badges

Thanks for link, but that's not solving my problem - i need to execute change of Status field when timer gets 0:00. Timer shows the time till is user's reservation active so i want to stop the timer at 0:00 and start some workflow with change of field Status.

Reply
Anand Wani responded on 9 Nov 2018 6:08 PM
My Badges
Verified Answer

Hi Alexandr Jermolajev,

You can solve this problem with JavaScript since you are using Microsoft Dynamics CRM 2016.

Retrieve the value of the timer using:

var seconds = Xrm.Page.getControl("timer").updateTimeDifferenceInSeconds();

This function returns the current current ticks of the timer in seconds; you can then set the "Status of reservation" field when the value of the timer reaches a certain value.

Xrm.Page.getAttribute("statusofreservation").setValue(value);

The drawback of this method is that it will break once you upgrade to Dynamics 365.

Reply
Alexandr Jermolajev responded on 12 Nov 2018 1:37 AM
My Badges

Hi Adrian,

thanks for clarification, that's exactly what i needed. Have a nice day!

Reply
Verified Answer

Hi Alexandr Jermolajev,

You can solve this problem with JavaScript since you are using Microsoft Dynamics CRM 2016.

Retrieve the value of the timer using:

var seconds = Xrm.Page.getControl("timer").updateTimeDifferenceInSeconds();

This function returns the current current ticks of the timer in seconds; you can then set the "Status of reservation" field when the value of the timer reaches a certain value.

Xrm.Page.getAttribute("statusofreservation").setValue(value);

The drawback of this method is that it will break once you upgrade to Dynamics 365.

Reply

SBX - Two Col Forum

SBX - Migrated JS