NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Johan de Klerk on September 04, 2019, 09:29:15 PM
-
Hi Bruce,
I have a Customer Browse (popup).
I have a Inline Button, this Button calls a Browse, InvoiceList, (as popup) with a list of Outstanding Invoices.
The customer clicks on a invoice and a popup form opens to allow for payment.
In the PostUpdate of the form I update the customers outstanding balance.
When closing the InvoiceList browse I need to refresh the customer line to show the updated outstanding balance.
At this stage you need to close and then open the Customer Browse to see the new outstanding balance.
How would I do this?
What command do I need to use?
In which embed do I put the code?
Regards
Johan de Klerk
-
the code would go in the FocusBack routine in the browse you want to refresh...
cheers
Bruce
-
Hi Bruce,
Thanks.
What would be the code I put in there?
I only need to refresh the Cus:Outstand for this particular Customer.
Regards
Johan de Klerk
-
to just do 1 row is something like;
do OpenFilesB
If p_web.sqlsync then p_web.SqlWait(p_web.SqlName).
p_web._LoadRecord(Countries,COU:key)
open(thisview)
p_web.LoadViewRecord(ThisView,Countries,COU:key)
p_web.ViewToSessionQueue(ThisView)
loc:InView = 1
do BrowseRow
loc:InView = 0
do SendPacket
Close(ThisView)
If p_web.sqlsync then p_web.SqlRelease(p_web.SqlName).
do ClosefilesB
cheers
Bruce
-
Hi Bruce,
Thanks, will try.
I am not using SQL but TPS.
Is the SQL in your example used for TPS files as well?
Regards
Johan de Klerk
-
you can leave it in.
-
Hi Bruce,
Back to this one.
I could not get your code to work, I can guarantee it is because I do something wrong and/or don't understand the concept.
Please see attached modified Books (71) Example App.
How to test it:
1) Open Customers
2) Click on "Test Update", it will open a "DummyInvoice" Browse
3) Click on "Change Cust Name" on any Row
4) It will show the current Customer Name
5) Change the name to something else
6) Click on Save
7) Click on Close on the "DummyInvoice" Browse
8) The Name is still the Old Name
The code on the "BrowseCustomers" in the GotFocusBack Embed is what I can't get to work to only refresh the details of this customer.
Please help.
Regards
Johan de Klerk
-
Bruce,
Forgot to say.
You will notice I have code in the GotFocusBack that I butchered from template code.
It works but I think it is totally wrong.
Regards
Johan de Klerk
-
we can chat in the webinar.
cheers
Bruce
-
100%