Genesys CTI User Forum > Genesys-related Development

WDE Customization | Activate Mark Done Button Programmatically

<< < (2/2)

RobertH:
Command chain must be working. you don't need to use workarounds and simulate click :-)

I did it like that:
private IInteractionManager ixnManager;

ixnManager = _container.Resolve<IInteractionManager>();

//if you are in interaction view just take current interaction from case
IInteraction ixn = ixnManager.GetInteractionByEntrepriseId(interactionId);

IDictionary<string, object> parameters = new Dictionary<string, object>();
//maybe bundle will be part of case depending from which view are you using
parameters.Add("CommandParameter", ixnManager.GetBundleById(ixn.BundleId));

//execute command chain with correct parameters and it will work
container.Resolve<ICommandManager>().GetChainOfCommandByName("BundleClose").Execute(parameters);

vinicius.gaspar:
[quote author=RobertH link=topic=11418.msg52157#msg52157 date=1569570913]
Command chain must be working. you don't need to use workarounds and simulate click :-)

I did it like that:
private IInteractionManager ixnManager;

ixnManager = _container.Resolve<IInteractionManager>();

//if you are in interaction view just take current interaction from case
IInteraction ixn = ixnManager.GetInteractionByEntrepriseId(interactionId);

IDictionary<string, object> parameters = new Dictionary<string, object>();
//maybe bundle will be part of case depending from which view are you using
parameters.Add("CommandParameter", ixnManager.GetBundleById(ixn.BundleId));

//execute command chain with correct parameters and it will work
container.Resolve<ICommandManager>().GetChainOfCommandByName("BundleClose").Execute(parameters);
[/quote]

Thanks for sharing! This method worked way better.  :)

Navigation

[0] Message Index

[*] Previous page

Go to full version