cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
troyhoskison
Helper I
Helper I

Working days calc

Hi,

 

I have a CDS table that has a field in that is the Customer due date.

 

From this I need to work out the internal due date, which is 2 days before the customer due date. However i need 2 working days not two actual days.

 

  • A calculated field it limited to only actual days, not working days.
  • Business rules have the same limitations
  • Power automate might work, but it only runs once every 5 minutes, so not useful in a production environment

Any thoughts on how I sort this problem out?

 

The second part is; once I have the internal due date I need the start date, which is the internal due date minus the lead time.

 

Thanks

 

Troy

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
dpoggemann
Solution Sage
Solution Sage

Hi @troyhoskison ,

 

There is another one! :). It is the original workflow capabilities that have been built into Dynamics 365 for Sales (CRM) for many years.  You can build workflows that are real-time or background with many options.  Not as powerful in some ways at flows but more powerful in others (i.e. real-time).  The workflow utilities from Jason Lattimer work with this type of workflow environment.

 

The following is an overview and there are plenty of videos you can find online as well.  

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/workflow-proce...

 

Hope this helps, if so, please mark solution as accepted.

 

Thanks much,


Drew

 

View solution in original post

8 REPLIES 8
dpoggemann
Solution Sage
Solution Sage

Hi  Troy,
I would highly recommend utilizing MVP Jason Lattimer's date utilities solution to accomplsih your needs here.  I have used this a number of times and it has some great capabilities.
https://github.com/jlattimer/CRM-DateTime-Workflow-Utilities 
Hope this helps.
Thanks,
Drew

ChrisPiasecki
Super User
Super User

I was going to recommend the same as @dpoggemann, give those a try and see if it works, they are very useful as the out of box date functions in calculated fields are pretty limited as of today.

 

You could likely achieve the same with Power Automate, but if you need a real-time / synchronous response, then you need to rely on custom workflow activities / actions / plugins in Dataverse.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

mogulman
Skilled Sharer
Skilled Sharer

I needed a business day to exclude weekends and holidays (bank holidays).  I created a table of bank holidays and I ended up writing an Azure Function.

HI,

 

I followed the link but I am unsure what I am meant to do with the files? and how do I make use of them?

 

Troy

dpoggemann
Solution Sage
Solution Sage

Hi @troyhoskison ,

 

When you click on the link you will see on the main page a link.to the latest release.   From here you will be presented with the following file to download.   This is a Solution file that you can import into your environment in the Solutions area of make.powerapps.com.   These utilities can be utilized in workflows to calculate date values, etc.  This can be utilized in real-time workflows as well to set field values real-time vs. an asynchronous Power Automate flow.  More detail on solutions here.

 

Hope this helps.


Thanks,


Drew

troyhoskison
Helper I
Helper I

Great, thanks for that. Still trying to work something out. There seems to be some called workflow which is different to Power automate. I found this doc: Microsoft Dataverse real-time workflows - Power Apps | Microsoft Docs

Which tells you how to change it to a real time workflow, but doesn't tell you want you are changing and how to get to that setting screen.

 

Is there a workflow thing that I haven't found yet?

 

I am excited that it looks like a solution to a lot of my problems is near. 

 

Troy

dpoggemann
Solution Sage
Solution Sage

Hi @troyhoskison ,

 

There is another one! :). It is the original workflow capabilities that have been built into Dynamics 365 for Sales (CRM) for many years.  You can build workflows that are real-time or background with many options.  Not as powerful in some ways at flows but more powerful in others (i.e. real-time).  The workflow utilities from Jason Lattimer work with this type of workflow environment.

 

The following is an overview and there are plenty of videos you can find online as well.  

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/workflow-proce...

 

Hope this helps, if so, please mark solution as accepted.

 

Thanks much,


Drew

 

View solution in original post

thanks, that is a bit hidden. I will still need to do some work to see if I can achieve what I want to achieve, but I think that is enough pointers for me to figure out the rest. 

 

Thanks

 

Troy

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (37,986)