Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: msd86911 on April 30, 2014, 04:19:22 PM
-
I tried to get attached data in custom command which should be run before release call using the code below
[i]this.container = container;
IInteractionVoice Context = container.Resolve<IInteractionVoice>();
IDictionary<string, object> contextDictionary = (Context.UserData as IDictionary<string, object>);
object caseObject;
if (contextDictionary.TryGetValue("Case", out caseObject))
{
ICase theCase = caseObject as ICase;
// Get attached data
string urlField = theCase.MainInteraction.GetAttachedData("AttachedDataX") as string;
}[/i]
Or Even Parties of interaction but i keep getting null values.
container is passed in constructor.
-
Have you Sample Genesyslab.Desktop.Modules.ExtensionSample?
Just small update in CustomCommand.cs:
// Get the parameter
IInteractionVoice interactionVoice = parameters["CommandParameter"] as IInteractionVoice;
string strANI = interactionVoice.GetAttachedData("ANI") as string;
// Prompt the alert dialog
return MessageBox.Show("Do you really want to release this call from " + strANI + "?\r\nThe call",
"Release the call?", MessageBoxButton.YesNo) == MessageBoxResult.No;