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
Process On Tab Close
Re: Process On Tab Close
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 (104.78 KiB) Viewed 5523 times
-
- Screen Shot 2020-04-06 at 11.50.13 AM.png (70.67 KiB) Viewed 5523 times
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Process On Tab Close
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.
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.
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Process On Tab Close
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?
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?
Re: Process On Tab Close
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
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