CRM2016 on premises
Whilst writing a plugin, I received a lot of help writing a function to query the calendar for 'working day dates' as this was needed to calculate a payment date from an imported file
In all there are three function that deal with non working dates and return a 'next' valid date. This all work fine in a plugin, however, I now have the same requirement but within a workflow. What I am getting confused and stuck on is that in a plugin, the service provider is passed to the function, but in a workflow there is no iService Provider. Any suggestion on how to adapt the function or to what to palm in instead of serviceprovider
Public Function CheckWorkingDay(serviceProvider As IServiceProvider, datetotest As DateTime) As Boolean If (IsItWeekend(datetotest)) OrElse (CheckHolidays(datetotest, serviceProvider)) Then Return False Else Return True End If End Function
*This post is locked for comments