Process On Tab Close

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Process On Tab Close

Post by PointsWell »

Is there a way to run a process on closing a tab.

I have a need to create a new BO (and sub BOs) user would like to be able to have multiple creates on the go at the same time and be able to refer back to things. I was going to do with a new tab but I have come across a problem. If the tab gets closed before the record is saved then I need some way to delete the partially created BO that is on the open tab.

There is no obvious Run Process On Close though. I am using a temporary (persisted) BO that I could run a sweep up process against to tidy up though I'd rather definitively clear away the junked BO at the point that it is junked rather than some timed process to clear down the rubbish.

I'm also at a dead end as to how to make sure that on putting the tab back into focus how to capture the ID of the parent BO which is used to filter queries of Sub BOs
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Process On Tab Close

Post by BLOMASKY »

I can't help you with the 1st, (process on closing tab), but I can with making sure the correct records are selected whenever the tab gets focus again. I. have that same issue. I allow the user to quote multiple customers at once. When they select to enter a quote, it opens a new tab and updates LISU with the customer in context. It is done by having a process run when the tab gets focus. In my case, saveSelectedCustomer
Attachments
Screen Shot 2020-04-06 at 11.50.22 AM.png
Screen Shot 2020-04-06 at 11.50.22 AM.png (104.78 KiB) Viewed 5091 times
Screen Shot 2020-04-06 at 11.50.13 AM.png
Screen Shot 2020-04-06 at 11.50.13 AM.png (70.67 KiB) Viewed 5091 times
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Process On Tab Close

Post by PointsWell »

Thanks Bruce

I found your thread late last night. Will check this out today.

Seems like there needs to be an addition to the feature request "on tab close" event.
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Process On Tab Close

Post by PointsWell »

Hmmmm so I have a bit of a problem in that I am not creating from any existing record, so I don't have anything to pass into context, I need to grab the context of what is on the tab when it is returned to.

Maybe I will only allow the creation of one new BO at a time.

I don't suppose you have a basic example of what you are doing that you could share?
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Process On Tab Close

Post by BLOMASKY »

be happy to share, but let me explain the workflow. I have a list of customers and a quote button. When the user clicks the quote button, I need to save the customer ID, since they can then go back to the list of customers, search for a different customer and click the quote button on that customer. Now I will have 3 tabs, the customer search tab with the latest customer selected, and 2 quote tabs. When the user sets the original quote tab in focus, I need to know who the customer is so when new quote records are created they get associated to the correct customer.

The process that I run just saves the customer into LISU so it looks like: LoggedInSystemUser.selectedCustomer = Customers

If you want to see any of the code, be happy to share.
Bruce
Post Reply