Link to home
Start Free TrialLog in
Avatar of mcrman
mcrman

asked on

Using dates and times but accounting for weekends

I am using MS CRM 4.0 and have a few workflows on my case management.  One of them is for case exculation based upon case severity.  In essence after so many hours the case priority will be set to esculated.

This works fine but it does not take into account the non workable hours or days.  So if for example a level 4 case is set to esculate within 24 business hours.  If the case is created on Friday at 4pm (we close at 5pm) the case will esculate on Saturday. (Wew are closed on saturday)  The case should not count Saturday and sunday as time opened and the case should esculate on Monday at 4pm.

Is there any way to do what I need within the workflow?
ASKER CERTIFIED SOLUTION
Avatar of crm_info
crm_info
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mcrman
mcrman

ASKER

Thanks for the reply.  This does look like it will fit the bill.  I was wondering if you could help me further as I have not registed a plugin before.  I downloaded the PluginRegistration tool, and I get connected to the server and see the other plugin but when I try to register this one I get an error that says

Unhandled Exception: System.ArgumentException: A BadImageFormatException has been thrown while parsing the signature. This is likely due to lack of a generic context. Ensure genericTypeArguments and genericMethodArguments are provided and contain enough context.
   at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
   at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
   at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly)
   at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e)
Inner Exception: System.BadImageFormatException: Could not load file or assembly 'Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)

Any thoughts?
Hmm, I'm not familiar with that error message and don't have time to do a lot of troubleshooting at the moment.  I'll try to come back to this later today or tomorrow when I can install it in a test environment.
In the meantime, you may want to post your question on the blog that you downloaded the add-on from to see if the author can answer your question.  My hunch is that his plugin may not be compatible with your current CRM Update Rollup version.
Avatar of mcrman

ASKER

Well, a quick google search showed that it was VISTA and the 64bit OS causing this issue.  I ran the registration tool on the 2003 server and it had no issues working.

I now seee the new workflow steps.  I will update this thread with my results.

Thansk for the link.. :)
Avatar of mcrman

ASKER

The new routine do as described.  The look at the work days and wait and adjust accordingly.

Now if I could get a routine that would do work hours as well. :)