|
Steve Schroeder
Posts: 4
Joined: 2017-08-08
|
We have a ADXOlForm in a message/insepector window. When the user uses the Next/Previous function from the Quick Access toolbar, events for that form do not always fire. They of course fire when you open the message but as you go next, next, next...events are not firing and import code does not run. We think it may have to do with the messages being cached. If you move next, then previous, you can get the events to fire.
Any help would be greatly appreciated and I can of course explain more fully as neccessary. Thanks. |
|
Posted 08 Aug, 2017 16:25:13
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Steve,
As far as I understand you mean the events such as ADXBeforeFormShow and ADXAfterFormShow, right? If yes, everything is correct, these events may not fire in this case because the Inspector window is not recreated and therefore your form remains the same. In addition, I would suggest using the ADXInspectorActivate event, and in this event check the EntryID of the currently opened item - if it has been changed, you change the contents of your form. |
|
Posted 09 Aug, 2017 08:42:53
|
|
Top
|
|
Steve Schroeder
Posts: 4
Joined: 2017-08-08
|
Thank you Dimitry. I seem to have conveyed the issue correctly, from your response. Remains to be seen though if the ADXInspectorActivate fires every time, when the user moves next and previous. I will give it a whirl and report back. Thank you. |
|
Posted 09 Aug, 2017 09:28:42
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Steve,
If you have any questions or need more information feel free to ask me. |
|
Posted 09 Aug, 2017 09:31:18
|
|
Top
|
|
Steve Schroeder
Posts: 4
Joined: 2017-08-08
|
private string _currentItemEntryId = string.Empty;
.
.
.
this.ADXInspectorActivate +=new AddinExpress.OL.ADXOlForm.ADXInspectorActivateEventHandler(this.AutoDetectEmailADXForm_ADXInspectorActivate);
.
.
.
private void AutoDetectEmailADXForm_ADXInspectorActivate(object sender, ADXInspectorActivateEventArgs args)
{
var currentitem = GetCurrentItem();
if (currentitem != null)
{
if (!_currentItemEntryId.Equals(currentitem.EntryID))
{
FormatPowerbar();
}
_currentItemEntryId = currentitem.EntryID;
}
}
|
|
Posted 09 Aug, 2017 11:14:46
|
|
Top
|
|
Steve Schroeder
Posts: 4
Joined: 2017-08-08
|
Dmitry Kostochko writes:
Hi Steve,
If you have any questions or need more information feel free to ask me.
Dimitry,
Your advice led us to our solution. Thank you! |
|
Posted 09 Aug, 2017 16:15:40
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Steve,
You are welcome! |
|
Posted 10 Aug, 2017 03:18:39
|
|
Top
|
|