If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53671 by PointsWell
Mon Apr 06, 2020 6:01 am
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
#53674 by BLOMASKY
Mon Apr 06, 2020 3:51 pm
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 1303 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 1303 times
#53686 by PointsWell
Mon Apr 06, 2020 9:46 pm
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.
#53690 by PointsWell
Tue Apr 07, 2020 6:41 am
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?
#53691 by BLOMASKY
Tue Apr 07, 2020 4:48 pm
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

Who is online

Users browsing this forum: Google [Bot] and 24 guests