NetTalk Central

Author Topic: validate delete from a browse  (Read 2829 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
validate delete from a browse
« on: July 30, 2008, 11:46:46 AM »
Hi All,

I want to execute some code when a user deletes a record from a browse without displaying the form. I can't really see any embed points.

Cheers,

Kevin

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: validate delete from a browse
« Reply #1 on: July 30, 2008, 12:54:43 PM »
Kevin, one place you might start is in the browse's embed: User did something in browser | User clicked on a row in the browse. You might be able to do some code that checks for the delete action and intercept it before it calls the alert to confirm delete.

There's a reference to the delete popup window in the netweb.js and the function is preparedelete, but I can't seem to find the reference to it in the browse or form. I would think the source of that function being called is where you'd want to put your delete code.
Mike Grigsby
Credify Systems
Central Oregon, USA

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: validate delete from a browse
« Reply #2 on: July 30, 2008, 05:00:29 PM »
I'm trying to do the same thing. I put a delete button on the browse row and it even asks me if I'm sure... but doesn't delete the record. I'm not calling a form at all. It just doesn't delete the record... which kind of makes sense really because the htm must post something and something else needs to delete the record... I guess it can't do something in the same procedure?

It's confusing because some code creates html and some let's you work on the actual file.

Seems like it ought to work without calling a form... but I'd like to know where to put the actual delete code myself or if it's even possible to call code from a button where the code is located in the same procedure.

I suppose you could set a variable and perhaps call the browse again?

Ray
VMT

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: validate delete from a browse
« Reply #3 on: August 01, 2008, 05:37:12 AM »
Hi Kevin,

The PreDelete routine in the form is the place it _should_ go.
However it has been a long while since I played with the Delete code, so I won't swear to it.

Ray's issue is different - in his case he has a multi-component key.

Cheers
Bruce