4

You need to make sure you update the CaseMilestone before the case saves as closed. The milestone must already be closed when the case is closed. Use a before update trigger on your case, and make sure that you update your completion date prior to closing the case. If your case is switching entitlement processes, this is more difficult, but you still do ...


4

Unfortunately this is not an easy thing to do, however I can tell you how we do it. We have a trigger on the Case object that fires on insert and update and anytime we have criteria that matches (for us, Status change). This then passes a set of Case Ids to an @future call. In that @future call we pull the TargetDate from the CaseMilestone Object (for the ...


4

The Case Milestone (a joiner between the Milestone and the specific case record) does not have any note field, and does not allow custom fields to be added. Because of this, you will not be able to have your Agents add information directly to the case milestone. What I would suggest is that you have the agent add a comment to the case Comments, and then use ...


4

I struggled with this myself for a while before coming to the realization that CaseMiletones that are not yet completed (or violated) will be deleted by the system when the criteria they use is no longer valid. However if they are completed (or violated) they will never be deleted by the system, and in fact cannot be deleted manually (even from apex ...


4

As it's explained in the Knowledge Article Case.MileStonestatus is a very special field, populated and treated differently as most other fields in Salesforce. Schema reports the field as String(30). Even if it is displayed in Setup, in my tests (Execute Anonymous Context) it seems not to be accessible by Apex Case c = new Case(); c.Subject='test'; c....


3

Salesforce doesn't provide options to track histories for CaseMilestone object. You need to create a custom object and store the values of each individual fields which you want to track. Refer Field History Tracking You can track the field history of custom objects and the following standard objects. Accounts Articles Assets Campaigns Cases Contacts ...


3

In Winter 16, The "Stopped time" and "Actual Elapsed Time" will be available on the Milestone entity. It will work with Business hours too.


3

Salesforce doesn't close the previous active milestone automatically when you are changing the case status and creates a new milestone. With the help of apex you need to search the active milestone (e.g.Milestone 1) of the Case and update the completion date in the CaseMilestone record. Refer the below screenshot for understanding. Please find the related ...


3

When you use Entitlement & Milestones, Case object will have an attribute called Stopped (API: IsStopped). You can make it as true to stop milestone. You can create workflow or trigger to stop the milestone using, objCase.IsStopped = true; Also, you can calculate how long it is being stopped using StopStartDate attribute. Again, if you change the ...


2

You can not update TargetDate and most of the other fields on CaseMilestone as these are not writable fields. According to the SOAP API Developer Guide, the only fields which allow update are Start Date and Complete Date.


2

how can we check if all milestones are completed on that case ? You could query and check isCompleted values SELECT CaseId, CompletionDate, CreatedDate, ElapsedTimeInMins,Id, IsCompleted, IsDeleted, IsViolated, MilestoneTypeId, MilestoneType.Name, StartDate FROM CaseMilestone WHERE CaseId='<case id>' How can ...


2

This is tricky requirement but exactly I have achieved. Design Create Entitlement Process and define Miletones based on which Case will enter into the milestone. Milestone type will be Independent. You will define single Milestone for this process like Resolution Time. If you have a different SLA based on case types then you need to write code for proper ...


2

My question is that what make different between task and work order? A Task is a simple one-shot activity. You use it to track a single phone call with a customer, an email that was sent or received, or to do something simple like sending out a contract. A Work Order is used to track work done for a customer, which typically may involve several steps, such ...


2

If I can understand your question correctly, the milestone duration (in minutes) will be based on the difference of Custom Datetime field and current system date. So, you need to create a apex class which implements Support.MilestoneTriggerTimeCalculator and here you will calculate the duration of that milestone. global class myMilestoneTimeCalculator ...


2

Scenario 1: It might be possible that, the existing milestone is not closed (which is disappearing) before completion and one new milestone is getting created before closing the earlier milestone. May be the milestones are getting created based on case status changes. If you close (explicitly, through some coding or process builder) the previous ...


2

You can use a combination of features that facilitate this process, all without ever touching Apex. I would likely recommend parent/child cases in order to notify certain teams of work to be done, which can all be aggregated back to the parent via Process Builder. Milestones can track SLA, Omnichannel Routing and/or Assignment Rules and Queues to get the ...


2

After several test I found the solution to the error, which is caused per not set the field SlaStartdDate in the case estructure in the SERV_COL_TestDataFactory.createCase(); Is necessary to set a value to this field in the estructure that you make for case. Example: public static list createCase(Id accId,Id tfId, Integer casQty){ List<Case> ...


1

Out-of-box Milestone's field has not been exposed by Salesforce to add it to Listview. Workaround Create a Datetime field on Case object and try to update that field from trigger or process builder with a combination of flow, querying Milestones record. And finally add this field to ListView.


1

After you'll enable Entitlement in the org you will be able to add to the case layout field called: Timeline(Minutes)


1

You need to add isCompleted = false to find out which Milestones are open in the case and finally update the list the way you are doing. SELECT Id, CaseId, CompletionDate, MilestoneTypeId, MilestoneType.Name FROM CaseMilestone WHERE CaseId =: closedCasesSet AND IsCompleted = false


1

Milestone clock is running properly. For Completed Milestones, time remaining will be always zero. Those milestones which are in progress, time remaining will be shown in that. Refer CaseMilestone documentation for more info.


1

BY Traversing through your Entitlement Process you can set your Milestone Level Business Hours.


1

I'm not familiar with entitlement processes, but if it works like views than you can just leave the value empty and it will find null values.


1

You can do this upon executing following SOQL SELECT SUM(ElapsedTimeInMins) From CaseMilestone WHERE CaseId = '<case id>' and IsCompleted = true Refer CaseMilestone Object definition Update You could limit your query to display the first record milestone record. You could also add case attributes (Category and Sub Category) in the filter. ...


1

Refer Milestone Recurrence Types No Recurrence: This is the option we need if the milestone occurs once, such as our First Response and Fix milestones. Independent: This type of milestone start date is only based on the case criteria. If another milestone is created, the start date is based on when the last milestone completed. Sequential: This type of ...


1

Salesforce does not complete the milestone automatically. You need to run a code to complete the milestone. It is possible multiple milestones are run simultaneously if you don't complete other ones. Code to complete milestone is as follows: public class MilestoneUtils { public static void completeMilestone(List<Id> caseIds, DateTime complDate) ...


1

You are creating Entitlement record through your code without associating to an Entitlement Process. Also, make this Entitlement Process to Active. Moreover, your test class might fail during deployment if you use organization data. Update DML operation cannot be performed on SLAProcess Object (i.e. Entitlement Process). So, you need to rely on ...


1

addError is meaningless in this context, because it won't be reported anywhere. Also, you're in a normal asynchronous context, which means you're still limited by certain rules, such as the 10k DML row limit and the 50k SOQL row limit. You need to check your debug logs to see if an exception was thrown. If your intent is to process the entire database, you'...


1

Ok... turns out that the elapsed time is simply the DIFF in businesshours between the milestone completion date and start date. It doesn't take into account the time when the entitlement was stopped. I got this confirmed today by Salesforce support. What I did as a workaround: created a custom object "Completed Milestone" with basically the same fields ...


1

Service cloud in Salesforce has one feature called Entitlement which helps you provide the correct support to your customers. It includes a variety of features that let you define, enforce, and track service levels as part of your case management process. milestone is one of them. So Once we assign Entitlement for a customer and we create a case for that ...


Only top voted, non community-wiki answers of a minimum length are eligible