Case SLA timer not matching Default SLA Settings - dynamics-crm

I have SLA Failure defined as 2 Days in the Service Management in my Dynamics Customer Service Sandbox, however each time I create a case, the case timer starts as 7 days.
Is this a bug in Dynamics 365 or do we need to change some settings for it?

Make sure to validate all these:
Setup the Business hours (Work days/Work hours), and holidays. This will drive the behavior you are seeing. Read more
Setup the SLA/items, if you have multiple SLA - verify it is activated and set as default. Read more
And multiple SLA items can be reordered and verify the SLA associated to your case record using this technique
Verify the timer settings

Related

How long will a workflow stay in a Status Reason of "Waiting" before it times out?

I'm wondering how long a Dynamics CRM workflow will stay in a Status Reason of "Waiting" before it times out/gets cancelled automatically?
I have a workflow for "Renewal" Opportunities with the following step: "Wait until Today's date >= 3 months before Renewal Date." Then, the record is updated. I'm worried that if the workflow has a status of "Waiting" for too long, it will cancel automatically. Will this be an issue? If yes, what is a better way to handle "Renewal Opportunities", so the Opportunity Name gets updated with the word "Renewal" 3 months before the date in the "Renewal Date" field?
Thanks!
It will wait indefinitely. But... as someone who has written products that rely on waiting workflows, I can say that there can be issues. Perhaps most prominent is the risk of the workflow getting cancelled before its trigger date - not "automatically" but by a user or user-defined process.
One client has routines that cancel waiting workflows on a regular basis. That broke everything all the time until we moved their scheduling out of workflows to an online scheduler.
In general it's fine to rely on waiting workflows that are scheduled months out, but it's also prudent to have a mechanism to confirm that they're operating and recover when they're not.
Aron did a good job of tackling the first part of your question.
If yes, what is a better way to handle "Renewal Opportunities", so the Opportunity Name gets updated with the word "Renewal" 3 months before the date in the "Renewal Date" field?
1) Create a procedure:
Often a manual procedure is more cost effective and reliable than developing automation.
- Create an Opportunities Pending Renewal view which shows all opportunities where the Renewal date is within X days of today.
- Create a Renew Opportunity workflow
- Put in place a process where by a user regularly (once a month/ once a week?) opens this view and runs the Renew Opportunity workflow.
This is a good option if the renewal does not need to occur on an exact date.
2) Have an external application launch the workflows:
You could write a lightweight scheduled application to carry out this operation. If you take this route, I recommend keeping as much of the configuration in CRM as possible by having the application execute over the results of a CRM view and kick off workflows to carry out the renewal action. That way when your business decides to change their rules (e.g. different renewal period) you just update the view criteria or workflow.
This is a good option if you have in-house dev power and if there are many such workflows that you can leverage your scheduled application to handle.
3) Have a plugin launch the workflows:
This is my personal preference. Same as Option 2 except rather than using a scheduled console application you let CRM host and schedule the job. Create a custom scheduled task entity, and set up a workflow which waits for some period (e.g. 24 hours) then creates a scheduled task record. Add plugin logic which fires on-create of scheduled task records, which carries out the same actions from option 2.
This is better than #2 for several reasons:
- Does not require external hosting, no integration concerns
- The job can be triggered manually simply by creating a scheduled task record
- You can add result logging to the scheduled task record
Other thoughts:
I won't pass judgement on whether the above options are "better" than waiting workflows, they all have different strengths and weaknesses. The Async service is much more reliable that it was historically, but I personally still try to avoid using workflow which wait for extended periods of time, primarily for system complexity and performance reasons. If you need automation and don't have in-house developers, then your best option probably is to set up waiting workflows.

What is the default schedule for the default CRM 2011 maintenance jobs?

I have a CRM 2011 installation that experiences a huge spike in I/O at a certain time of day (11 am).
I have a good suspicion that it's the default Rebuild Index Job.
Everything is at default values, and the latest applied update is RU13.
Sql is sql 2008 r2, sp1.
I've found this MSDN blog and also other sources suggesting updating the default job's schedule to run at night, or not at all.
But I haven't been able to find what is the default schedule for these default CRM jobs. I understand they are executing daily, but when?
at 1am, 1pm, 1h after service start?
Also, is there a way to view execution history?
Dynamics CRM 2011 Asynchronous Service regularly executes multiple internal maintenance jobs for each organization (database) and that these are scheduled initially at the time of organization creation on default frequencies (daily, monthly, etc.). Hopefully, you're also aware of the need to reschedule these jobs to execute during non-peak usage hours so as to minimize impact on system performance
You can find more details in this MSDN blog
The interesting comment there from Austin give you some insight.
MSCRM_CONFIG.[dbo].ScalegroupOrganizationMaintenanceJobs table keeps track of LastResultCode and LastRunTime
Useful query:
select
LastRunTime,
CASE OperationType
WHEN 14 THEN 'DeletionService'
WHEN 15 THEN 'IndexManagement'
WHEN 30 THEN 'ReindexAll'
WHEN 32 THEN 'CleanupInactiveWorkflowAssemblies'
WHEN 40 THEN 'GoalRollup'
END OperationType, OperationType,
enabled, ExecutionTime,LastResultCode,LastResultData
,MaintenanceWindowEndTime,MaintenanceWindowStartTime, ModifiedOn
,NextRunTime,RecurrencePattern, RecurrenceStartTime, StartedOn, State, IsDeleted
from ScaleGroupOrganizationMaintenanceJobs
order by LastRunTime desc
I remember finding the answer to this a long time ago, but I can't find the link now. The jobs' default schedule depends on when in the day you originally installed Dynamics. IIRC, the jobs are scheduled to start 24 hours after installation. This is kind of a silly default since most would install it in the middle of the workday, but that's why they recommend that you change it to be more appropriate for your business schedule.

Dynamics CRM Field Service: Unable to approve time off requests

I'm looking at the Field Service module of Dynamics 365. I'm trying to block out an employee's time on the schedule board by creating a time off request.
I can create the time off request, but as soon as the object is saved, the system automatically deactivates it.
The system will reported success when Approving a time off request but I can't see any changes in the data nor any records created in the audit summary. If I try to Active a time off request, the process fails due to a Business Process Error:
Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Time off request records can't be reactivated.
To the best of my knowledge, there aren't any process changes to time off requests (but I'm unsure how to confirm this). From everything that I've read, this should be a fairly straight forward process so I'm not sure where to look next.
This page from the documentation is a good example of what I'm trying to do. It's failing on step 3 of "Approve a time-off request".
I've tried creating time off requests:
in the past
for tomorrow and more than 2 weeks future
of duration lengths from 2 hours through 2 weeks
for various user accounts
The time off requests are not conflicting with booked resources.
Any advice on what I could look into to determine if someone modified any processes / workflows associated with time off requests? Or is there something that I'm not doing that I should be?
I've learned that Microsoft's documentation is not complete and there was a bug.
Additional info on how Time Off Requests are used
There are two views of Time Off Requests (TOR) available to managers: Active and Inactive.
Active TORs: Lists TORs that a manager needs to approve
Inactive TORs: Lists TORs that have already been approved (i.e., the request itself has been dealt with)
Bookable Resources have a Time Off Approval Required property. When true, TORs created for the user are Active; when false, TORs created for the users are automatically moved to Inactive.
All Inactive TORs should appear as grayed-out boxes on the Schedule Board. If you attempt to Activate an Inactive TOR, the following error will correctly be reported:
Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Time off request
records can't be reactivated.
Field Service Bug
Additionally, we experienced a bug that prevented Inactive TORs from being grayed out on the Schedule Board. I'm not sure if this was a process error or a client-side style issue.
We observed the bug in Field Service 6.1.0.1462. Upgrading to 6.2.1.38 resolved the issue and allowed Inactive TORs to show up on the Schedule Board.

Scheduled Tasks/plugin on CRM 4.0

Is it possible to schedule pulgin on CRM.
I ‘m trying to create a reminder task activity for an opportunity entity if no there has been no activities in the last week. I would like this to run every week.
Thanks in Advance.
Though there is no such thing as a recurring workflow in Dynamics CRM, you can simulate this behaviour by creating a Workflow Rule that
Gets fired upon creation of the record
Checks a condition
Conditionally does something
Waits for n days/hours/minutes
Calls itself again
Don't forget to mark the rule as "Run as a child workflow".
I think perhaps a better approach would be to build that functionality into a workflow? I have not been doing much CRM lately, but I have implemented what you described, in Crm 1.2 back in the day. This turned out to be very useful for reporting as well, pulling reports of what sales staff makes it a habit to not follow up on opportunities.
Best Regards
Rihan
I would recommend to utilize SQL Server Scheduled Job. Although workflow can be used for this problem, but waiting-state-workflow is considered application consuming.
The reason is because the waiting-state-workflow is held in the memory, and it needs to be validated against certain timing condition periodically. In your case, it needs to periodically calculated whether it has exceed one week or not, and if it's yes, it will upload the waiting-state-workflow from the database to be executed.
Regards,
hadi

Windows Workflow foundatation scheduling

If I have an ASP.NET app hosting a worflow where a trouble ticket passes through a fairly standard flow....at one point there needs to be an escalation occurring if a ticket has not been looked at or resolved in 6 months. Now lets say the 6 months have passed, but the IIS machine has been rebooted last month and not used. Will the workflow escalate the ticket?
When/how does the runtime check conditions on long running processes? Does it scan through the 1000's of workflows looking...or have an events table it checks? Does it even handle this kind of out-of-process workflow?
Seems like it would be a very common situation for a WF to handle but i can't seem to find any information.
You're not finding any information on this because you don't need any. It works. This is how it's designed to work. If the workflow host is configured to use the persistence service, then the workflow will be persisted when it's idle too long, and when the delay is over, it will be restored from the persistence store and resumed.

Resources