Topic by kahelfrich
I'm working on a C# program that creates orgs with SLA instances. It works most of the time for the hundreds of SLA types we have and orgs that I have created in a cloned testing environment.
Occasionally, I get an error trying to create one of the SLAIs, and this is what the error message and stack trace look like this.
* * * * *
SLA Error - Not Active: The NameOfSLA ID provided does not correspond with an active SLA.; Organization.ServiceSettings.SLAInstances[0].NameOfSLA
While performing create on Organization
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ContractLoader5.RightNowService.RightNowSyncPort.Create(CreateRequest request)
at ContractLoader5.RightNowService.RightNowSyncPortClient.ContractLoader5.RightNowService.RightNowSyncPort.Create(CreateRequest request) in c:\Users\khelfric\Documents\Visual Studio 2013\Projects\ContractLoader5\ContractLoader5\Service References\RightNowService\Reference.cs:line 23139
at ContractLoader5.RightNowService.RightNowSyncPortClient.Create(ClientInfoHeader ClientInfoHeader, RNObject[] RNObjects, CreateProcessingOptions ProcessingOptions) in c:\Users\khelfric\Documents\Visual Studio 2013\Projects\ContractLoader5\ContractLoader5\Service References\RightNowService\Reference.cs:line 23147
at ContractLoader5.RNTContract.CreateNew() in c:\Users\khelfric\Documents\Visual Studio 2013\Projects\ContractLoader5\ContractLoader5\RNTContract.cs:line 722
* * * * *
The first exasperating thing is that the SLAs in question ARE ACTIVE! I export the list from the database in RightNow and import it into a SQL Server db that keeps all the data I have to load.
The second exasperating thing is that while this error talks about what would appear to be the FIRST element in the list of new SLAInstances at index 0, "Organization.ServiceSettings.SLAInstances[0].NameOfSLA", the number isn't always 0, and it's frequently larger than the number of new SLAInstances , so for instance, one time I was adding 4 SLAInstances , and the message included "Organization.ServiceSettings.SLAInstances[13].NameOfSLA".
I had been specifying the SLA types by name, so I switched from looking up using the actual SLA name to using the ID number, and that didn't help. In fact, that's a THIRD exasperating thing I discovered. When you create an SLAInstance, and you want to use the ID to specify the type of SLAInstance to create, you don't use the sla_id (database name), you actually use the sla_set (database name) for the ID. Talk about confusing...
Anyway, HELP! Has anyone seen this error when the SLA type actually exists? I have to think it's a database issue, but I can't seem to fix it.