function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sgsg 

Flow to calculate number of working days between two days and Status duration.

Hi,

I need to write a flow to calculate Working days between Service completed date and assigned date. Also, It should not calculate the days/stop calculation when  Service Status =Denied, Duplicated, Hold, Reassigned, Returned back, Waiting. It should resume counting after moving out of these Statuses to In Progress.  Please assist on this. Thanks in advance.
Best Answer chosen by sg
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sangeetha,

I have similar approcah which was suggested by some other use in stack exchange which you posted.

https://salesforce.stackexchange.com/questions/393104/flow-to-count-no-of-days-between-two-days-with-a-status-condition

Did you get chance to try it and let me know what excatly issue you are facing in it.

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Do you want the difference in days? If so you may use Scheduled Trigger flow in this scenerio. But you will be able to only add days not not into hours. 


Can you confirm so I can share the flow for the same.

Thanks,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sangeetha,

I have similar approcah which was suggested by some other use in stack exchange which you posted.

https://salesforce.stackexchange.com/questions/393104/flow-to-count-no-of-days-between-two-days-with-a-status-condition

Did you get chance to try it and let me know what excatly issue you are facing in it.

Thanks,
 
This was selected as the best answer
sgsg
Hi Praveen,

I am using this approach for my requirement 
https://salesforce.stackexchange.com/questions/393104/flow-to-count-no-of-days-between-two-days-with-a-status-condition

Is it possible to exclude holidays too by adding some flow elements or is it possible only through trigger/apex? Please assist.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sangeetha ,

I guess you can access holiday object as mentioned in the below link and subtract the days from it.

https://munawirrahman.medium.com/count-duration-exclude-weekends-and-public-holidays-in-salesforce-without-any-codes-285277df35d

Thanks
 
sgsg
Hi Praveen,

Thanks for your response.

I saw this thread, But the thing is they are using a process builder to pass the start/end dates.In my requirement, I dont know the end date until the request is completed/or varies for each request. So its better this way to add working days(excluding weekends and holidays) untill the status is moved to completed. Do you have any suggestions based on this?