Skip to content
+1-888-319-3663

EONE BLOG

Tech Tuesday: Restricting Dynamics CRM Dates To The Current Year


Working with date fields in data can be a challenge and one of those challenges is why you have this subject today. One of our customers asked me if we could restrict some Dynamics CRM data by only pulling records for the current year. I think a few other people may want to do something similar so here are the steps for doing this. (I used the Opportunity Entity but it will work for any Dynamics CRM date field)

1) Create a Global Variable called GBL_CURRENTYEAR

globalvariable


2) Create a Pre-Map Task to run a script and use the following to pull the current year: GBL_CURRENTYEAR = Date.Today.Year

script
3) Now we can edit the CRM Query to include the Criteria for the current year in what ever Date field you choose like below:
>=’GBL_CURRENTYEAR-01-01′ AND <=’GBL_CURRENTYEAR-12-31′

query-criteria
This will assist you in creating a restriction on any Dynamics CRM date field.

Thanks,
Chris

Leave a Comment





RECENT POSTS


Tech Tuesday: Building My First Matrix Report
Overcoming the Top Challenges of Zendesk Integration
Accessing Historical Dynamics GP Data in NetSuite: Using Popdock
Popdock's Top 10 New Features
New Webinar: Getting Started with Matrix Reporting in Popdock

POPULAR POSTS


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships Partner All Hands Call Popdock promotions release SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training Zendesk

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.