How to get the active document in the Documents tab in 3.0

Discussions related to custom development with Select.
Post Reply
BBenson
Posts: 44
Joined: Wed Feb 23, 2011 4:06 pm

How to get the active document in the Documents tab in 3.0

Post by BBenson »

Hello,

When multiple orders are opened in Select 3.0, the 'Documents' window displays them in an Microsoft Outlook style pane where the user can select the order in which to create ReadyDocs. In our custom publish package shell UI, I also need to know which order the user has selected.
  • How can I capture which order the user has selected?
  • With IRunningDocumentsManager I can get a list of the open orders but cannot determine which one is active.
Thanks,
Bob
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: How to get the active document in the Documents tab in 3

Post by BobRichards »

To get the active order in a client package:

Code: Select all

IWindowManager wm = GetService<IWindowManager>();
IWindowFrame activeDocument = wm.ActiveDocument;
IOrder order = (IOrder)activeDocument.GetProperty("Order");
Of course, if the user has selected the Start Page (for instance), the active window will not be an order.
Bob Richards, Senior Software Developer, SoftPro
BBenson
Posts: 44
Joined: Wed Feb 23, 2011 4:06 pm

Re: How to get the active document in the Documents tab in 3

Post by BBenson »

Thanks but I have already tried that approach as well but when the Documents window is the active window, it is always null. More specifically the activeDocument.DocumentHandle is an empty GUID.

I am using that approach in our other shell UI package and it works fine, but not for the Documents window.

Bob
yatin.t
Posts: 24
Joined: Tue Jan 07, 2014 9:40 am
Location: Raleigh, NC

Re: How to get the active document in the Documents tab in 3

Post by yatin.t »

Unfortunately, we do not expose information about what order is selected in the order pane of the Documents tab.

Could you give me an idea of what you're trying to accomplish in your Shell package? Are you writing a custom print job handler or is it a UI extension? The reason I ask this is because you CAN get a handle on the corresponding order in a print job handler, if that's what you're trying to do. Just want to know if there's any way in which we can offer a solution that best fits your requirement.

Thanks.
Yatin Tawde
Softpro
Software Engineer
BBenson
Posts: 44
Joined: Wed Feb 23, 2011 4:06 pm

Re: How to get the active document in the Documents tab in 3

Post by BBenson »

We have both a print job handler which works fine and also a UI extension package. This print job handling package has been in existence for 3 years and has worked well. We also have a shell UI extension that has also been around for as long.

The UI extension includes a button to launch a proprietary document management utility tool that needs to know the current order number. This utility tool is part of our document management system and is where our print job handler publishes. With the change to 3.0 that moved the 'Documents' to its own tab separate from ProForm (as in 2.6), this utility tool is no longer accessible to our users when they are working with documents and they would like it to be available without having to go back to the 'Order' tab.

Thanks,
Bob
BBenson
Posts: 44
Joined: Wed Feb 23, 2011 4:06 pm

Re: How to get the active document in the Documents tab in 3

Post by BBenson »

Any update on this?
chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Re: How to get the active document in the Documents tab in 3

Post by chris.brady »

Was there ever a resolution to this, or is what Bob is trying to do impossible in Cameron? While our application is different, we too would like to get the active order while in the Documents tab without having to go back to the Order tab. Our users aren't fond of having to jump around where it wasn't necessary before.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: How to get the active document in the Documents tab in 3

Post by BobRichards »

There is still no work-around. Sorry.
Bob Richards, Senior Software Developer, SoftPro
Melissa McBerkowitz
Posts: 91
Joined: Wed Sep 10, 2008 3:33 pm
Location: Raleigh, NC
Contact:

Re: How to get the active document in the Documents tab in 3

Post by Melissa McBerkowitz »

Since there is no workaround for this issue, we will address this in an upcoming release, and are targeting the 4.0.2 release planned for late April/early May. (Reference TFS #255686)
Melissa McBerkowitz
VP of Product Strategy, SoftPro
Melissa McBerkowitz
Posts: 91
Joined: Wed Sep 10, 2008 3:33 pm
Location: Raleigh, NC
Contact:

Re: How to get the active document in the Documents tab in 3

Post by Melissa McBerkowitz »

This issue has been resolved for the 4.0.3 release which will be available next Monday.
Melissa McBerkowitz
VP of Product Strategy, SoftPro
Post Reply