We've Moved!
Please note that we have moved to our New Forum site.

How do you delay the instantiation of a View within IWS?
We have a view that we create for "primary calls" (not a consult, basically). See the code below.
The NotepadView works exactly how I'd like my view to work. The NotePad view isn't created until the call has established. I can't work out how to emulate this behaviour. Has anyone done something similar?
_viewManager.ViewsByRegionName["InteractionDetailsRegion"].Insert(0, new ViewActivator { ViewType = typeof(IMyView), ViewName = "MyView", ActivateView = true, ActivateOrder = 1, Condition = (ref object ctx) => { var primary = Helpers.IsPrimaryContact(ref ctx); Log.InfoFormat("Interaction Primary? {0}", primary); return primary; } });But I would like to delay the view being created until the call has Established. Similarly, I'd like to not create the view during a Preview interaction, but create it once the User calls the customer.
The NotepadView works exactly how I'd like my view to work. The NotePad view isn't created until the call has established. I can't work out how to emulate this behaviour. Has anyone done something similar?
I am not sure how to delay the instantiation in terms of seconds, but I do know how to delay the instantiation and trigger it off some other action occurring.
For example, register your view like this (possibly without a condition):
Then, after the action occurs that you want to drive displaying your view, do the following:
This will allow you to dynamically show your view based on some logic occurring. In your case you might want to examine what command chains are run when the user dials a preview record, and insert a custom command that actually displays the view (2nd block of code).
Regards,
Andrew
All Answers
I am not sure how to delay the instantiation in terms of seconds, but I do know how to delay the instantiation and trigger it off some other action occurring.
For example, register your view like this (possibly without a condition):
Then, after the action occurs that you want to drive displaying your view, do the following:
This will allow you to dynamically show your view based on some logic occurring. In your case you might want to examine what command chains are run when the user dials a preview record, and insert a custom command that actually displays the view (2nd block of code).
Regards,
Andrew