locked
Tips / Example on how to automate this RRS feed

  • Question

  • CRM2016

    I have a custom entity called 'new_PayableDates' which only has one custom field new_PDate (date field)

    Currently I am inserting dates in and deleting dates manually. I am looking for advice on how I can automate this task so that every day ( at 1am ) the entity is updated with the next 30 dates ( from the current date), Not including any 'closed business dates' or Saturday or Sundays.  I also want to delete / deactivate any dates that are prior to the current date

    any suggestions?


    Dont ask me .. i dont know

    Monday, April 4, 2016 2:31 PM

All replies

  • 1. you need to create a table in database or subscribe to service which gives you all the business days.

    2. Code a Windows Service/Scheduled Task which updates your newPDate field at 1am everynight.

    Monday, April 4, 2016 2:35 PM
  • If your solution was able to ignore all "inactive" dates (future or past), you might just create a bunch of records for the next 2-3 years using excel import. For example, you might add "ActiveOn" and "DeactivateOn" fields.. attach workflows to those fields (to activate and deactivate the records, respectively), then create an excel spreadsheet and import it to CRM.. The spreadsheet might look like this (what I'm missing there is holidays schedule, but you could add it to each of the WORKDAY function calls):

    - "formulas" view:

    - "No formulas" view:

    - Third row copied multiple times


    Alex Shlega, TreecatSoftware.Com


    Monday, April 4, 2016 6:31 PM