NetTalk Central

Author Topic: On insert change or delete I want to do something eg send a mail  (Read 3000 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
On a netwebform I know I can add code on post update and post insert to eg. send a mail.

Where do I embed code on a netwebbrowse to do the same, for insert , change , delete ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: On insert change or delete I want to do something eg send a mail
« Reply #1 on: June 20, 2013, 12:09:00 AM »
Hi Mike,

hmm - tell me more.
I suppose the short answer is "Browses do do Inserts, Changes or Deletes, Forms do" - but I suspect what you're asking is a tad more complicated. So build out the question a bit with some more context.

Also, is the browse calling the form in Page mode or Popup mode?

cheers
Bruce


MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: On insert change or delete I want to do something eg send a mail
« Reply #2 on: June 20, 2013, 05:24:25 AM »
Hi Bruce ,
well Im confused if you say only forms do insert change and delete.

what about an edit-in-place browse ?  when you don't specify a form procedure ?

All I really want to do is always send a mail when a record is inserted changed or deleted.

I have written a source procedure with p_web as a parameter.
all I want to know is where I should call it.

My forms are mainly pop-up forms ?
Why does that matter ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: On insert change or delete I want to do something eg send a mail
« Reply #3 on: June 20, 2013, 07:38:10 AM »
Hi Mike,

>> well I'm confused if you say only forms do insert change and delete.
>> what about an edit-in-place browse?

yes, in the EIP case (which is change only, not Insert or Delete) then the browse is doing the work. There's no "validate record" in that case because the record is saved after each cell is edited. The correct embed then is the Validate::fieldname routine (there's one for each EIP field.) So yeah, send a mail from there.

>> My forms are mainly pop-up forms?  Why does that matter?

Sometimes it matters, sometimes not. (In this case not.) In terms of program flow though the two modes are really very different. There's a lot going on under the hood to make it "seem the same" but there are situations where you need to handle them differently. (This is not one of those situations.)

Cheers
Bruce