Author Topic: Getting IWS attached data in Custom comand  (Read 2946 times)

Offline msd86911

  • Newbie
  • *
  • Posts: 20
  • Karma: 4
Getting IWS attached data in Custom comand
« 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.

Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
Re: Getting IWS attached data in Custom comand
« Reply #1 on: May 22, 2014, 08:31:05 AM »
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;