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
Nikhil Tripathi 13Nikhil Tripathi 13 

formula field requirement

I have a requirement to create response time between case(object) creation date and visit (object) visit date field.
But the challenge is that for one case we have multiple visit AND i have to show the response time for only first visit creation.

can it be done with no code. ??  anyone please suggest
 
Best Answer chosen by Nikhil Tripathi 13
Sai PraveenSai Praveen (Salesforce Developers) 
HI Nikhil,

Your flow shoold be something as below.

It should be recordtriggerd flow on service visit object 

User-added image

You have to get record of servicevisit  related to the service visit and sort it by created date and get the first created service visit.

One you get the service visit record you have to create formula to calculate difference between date fields and update it.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
HI Nikhil,

Are you okay to calculate it using Flow ?  It may not be possible with formula field 

Thanks,
 
Nikhil Tripathi 13Nikhil Tripathi 13
Hi Sai,
I am okay with flow as well .
Please guide.
Nikhil Tripathi 13Nikhil Tripathi 13
can you pin me on this mail id nikhiltripathi77704@gmail.com
Sai PraveenSai Praveen (Salesforce Developers) 
HI Nikhil,

Your flow shoold be something as below.

It should be recordtriggerd flow on service visit object 

User-added image

You have to get record of servicevisit  related to the service visit and sort it by created date and get the first created service visit.

One you get the service visit record you have to create formula to calculate difference between date fields and update it.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
This was selected as the best answer
Nikhil Tripathi 13Nikhil Tripathi 13
Thank you so much for your help. Learnt a lot
Nikhil Tripathi 13Nikhil Tripathi 13
Will it reflect for previous records as well
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Nikhil,

This wont reflect for existing records. If you want so you have to dummy update the service visit records using dataloader .

Thanks,
 
Nikhil Tripathi 13Nikhil Tripathi 13
service visit or service request because we have created the field on serive request 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Nikhil,

As the flow  is on service visit this object data should be updated do that flow gets triggered and it processes the logic.

Thanks,
 
Nikhil Tripathi 13Nikhil Tripathi 13

Sai Praveen  ,
Can we connect once , there is some problem with the flow I am facing right now
Nikhil Tripathi 13Nikhil Tripathi 13
Hi Sai, Can we connect  once, facing a issue with this flow  right now