How to edit an order via a service that is currently Open by a ribbon

Discussions related to custom development with Select.
Post Reply
bcole
Posts: 13
Joined: Thu Aug 25, 2022 10:00 am

How to edit an order via a service that is currently Open by a ribbon

Post by bcole »

We currently have a custom built ribbon that is used to overlay SPS orders with data from another System. Currently the overlay code sits inside the ribbon application. I need to move the overlay code out of the ribbon and into an API service that the ribbon can call. However, I am running into and issue because my service can't gain access/open the order because its considered an active order by the ribbon. If there any way I can still update the order even though the ribbon has the order open? Again the ribbons main function is to overlay, but we need the overlay code centralized because other applications need to use that same code. Any ideas are welcomed. Thanks in advance.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: How to edit an order via a service that is currently Open by a ribbon

Post by BobRichards »

I believe the issue is that only one entity (Select app, client app, server, automation snippet, etc) can open the order as read/write at a time. Unless you have a Select 4.6 version with multiuser enabled, you can't get around this. Whenever you call IOrder.OpenOrder() (or it is called for you in the case of the Select application), you are opening the order and only one caller can open a writeable version.

Can you write a Shell Package that would be able to be activated by the ribbon buttons and can access all open orders in the application?
I'm not sure if I see a solution to your problem. Sorry.

If I misunderstood the question, please let me know.
Bob Richards, Senior Software Developer, SoftPro
bcole
Posts: 13
Joined: Thu Aug 25, 2022 10:00 am

Re: How to edit an order via a service that is currently Open by a ribbon

Post by bcole »

Hi Bob,
I'm not sure I follow. If I created a powershell package, what exactly would be its function? Are you saying it would be able to open and already opened order (with write privileges)? Would it be this package's responsibility to first close the order and reopen it from another application? How does the powershell package overcome the obstacle of not being about to write to an open order when the writer is a different application? Also we are currently on version 4.3. Thanks for the help.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: How to edit an order via a service that is currently Open by a ribbon

Post by BobRichards »

I am not referring to PowerShell.

Select is a client/server environment with the ability to add custom functionality to either side. By creating Shell Packages, you can add new or alternate functionality to the Select client application. Similarly, you can add Server Packages to add common functionality to the server end. The code is typically written in C# using Visual Studio 2019.

I was assuming the Ribbon application you were referencing was built into a Shell Package within Select to modify the Select ribbon. However, it seems that you are referring to an entirely separate application that you built. Sorry about the confusion.

The rest of what I said still applies. Only one entity can have an order open for writing at a time. There is no getting around that.
Bob Richards, Senior Software Developer, SoftPro
bcole
Posts: 13
Joined: Thu Aug 25, 2022 10:00 am

Re: How to edit an order via a service that is currently Open by a ribbon

Post by bcole »

Hi Bob,
You are correct in your understanding of the issue. The ribbon that I'm referring to is indeed a shell package that appears as a button on the select menu (I wasn't aware of that at first). This shell package ribbon has the active order open and from that ribbon, I was trying to call an API to perform my overlay. Does the fact that I am already working within a shell package lend me any glimmer of hope based on your first proposed alternative? Does having a shell package provide me with any additional options? Or are we still at an impasse because only one instance of the select server can have the order open? I noticed from older post there was once a LockManager class that would allow you to clear a lock? My guess is that class has been removed.
Post Reply