Programmatically know the Time control Status using the GetState method

Introduction

Often we use Dynamic 365 Time Control when we want to keep track of time based on a certain date.

E.g. Whether a Lead has been qualified before the estimated close date etc.

In this blog, we will see how we can programmatically get the status of the Time Control using form scripting.

To know more about Time control and how to configure it, please follow this link.

In this example, I have configured the Time Control for Case Entity and on the load of the Form it will check the status of the Timer Control and show the Status as a Form Notification.

If the case is resolved before the Resolve By period then it is considered under Success and similarly, if the case is in the Cancelled stage then it is considered as Failure.

GetState method

Syntax: formContext.getControl(“<Your Timer Control Name>”).getState();

The name property of the Timer Control would be the logical name.

GetState method

Code:

To check and show the Timer Control as Form Notification, I have registered a script on Load of the…


Source link

More About This Author

Inogic
Inogic is one of the leading Microsoft Dynamics 365 ISV since 10+ years. Its flagship product Maplytics™ is a market leading certified (CfMD) geo-analytical mapping app. Maplytics empowers Dynamics CRM users across industries with the power of geographical data visualization, route optimization and along the route search with turn-by-turn directions, appointment planner, locational search by radius and shapes with drill-down filters and color-coded pushpins, heat maps, shape layers & territory management.
 
Inogic is renowned for its high quality and low-cost offshore development services and productivity apps like InoLink: QuickBooks + Dynamics CRM, User Adoption Monitor, Attach2Dynamics, Alerts4Dynamics Click2Export, Click2Clone, Kanban Board, SharePoint Security Sync, Lead Automation & Distribution, Map My Relationships, Auto Tax Calculator, Subscription and Recurring Billing and Marketing4Dynamics.

Author: Inogic

Inogic is one of the leading Microsoft Dynamics 365 ISV since 10+ years. Its flagship product Maplytics™ is a market leading certified (CfMD) geo-analytical mapping app. Maplytics empowers Dynamics CRM users across industries with the power of geographical data visualization, route optimization and along the route search with turn-by-turn directions, appointment planner, locational search by radius and shapes with drill-down filters and color-coded pushpins, heat maps, shape layers & territory management.   Inogic is renowned for its high quality and low-cost offshore development services and productivity apps like InoLink: QuickBooks + Dynamics CRM, User Adoption Monitor, Attach2Dynamics, Alerts4Dynamics Click2Export, Click2Clone, Kanban Board, SharePoint Security Sync, Lead Automation & Distribution, Map My Relationships, Auto Tax Calculator, Subscription and Recurring Billing and Marketing4Dynamics.

Share This Post On
Share via
Copy link
Powered by Social Snap