NetTalk Central

Author Topic: Email from a browse using it's data  (Read 4314 times)

Gregg Matteson

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Custom Program Solutions
Email from a browse using it's data
« on: March 24, 2008, 10:28:03 AM »
Using 4.30 , using a browse as a field in a Netwebform and "Send new value to server".
That works as Bruce suggested recently and loads the ID into a field (Subject in this case).
How do I retrieve the mailto and mailfrom from the browse's file to use in the sendmail?

Thanks ,

Gregg Matteson
Kindest Regards,

Gregg Matteson

'Software that's actually easy to use'

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Email from a browse using it's data
« Reply #1 on: March 24, 2008, 01:11:28 PM »
Gregg,

Sorry, I'm a little slow :) .. can you clarify a couple of things?

1. Are you calling the SendMail function from the Form?
2. Is the Subject the key field for retrieving the Email record?

If these are YES with gusto, then I'd just be retrieving the record before calling the SendMail function. But I suspect I'm missing something in your question.

You've got a browse with a bunch of emails in it, and you want to "Send" the selected record in the browse, right?

Cheers,

Stu Andrews

Gregg Matteson

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Custom Program Solutions
Re: Email from a browse using it's data
« Reply #2 on: March 24, 2008, 02:18:06 PM »
Stu,

I'm the one that's a bit slow. I probably didn't explain very well.

The Browse is the orders. The objective is as soon as the order is entered, the user highlights the record in the browse and presses a button on the record's row and an email gets sent to the office notifying us that there is a new order, the order number and who it's from.
As per Bruce's suggestion on another thread, I added a Netwebform, and added the orders browse as the only field on the form. On the Client-side tab I checked "send new value to server" . The result is that the order ID is filled in when the emailformcontrol is opened. I need to fill the other fields from the order record, client email and text .

Tried everything I can think of , however I really haven't grasped this web stuff yet.

Appreciate any suggestions,

Gregg
Kindest Regards,

Gregg Matteson

'Software that's actually easy to use'

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Email from a browse using it's data
« Reply #3 on: March 25, 2008, 06:28:05 AM »
Hi Gregg,

So you have the unique ID to identify the record.
Now you need to do a "fetch" from the file to get the rest of the record.

Cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Email from a browse using it's data
« Reply #4 on: March 25, 2008, 01:12:56 PM »
Gregg,

In my brain, it's kind of similar to how you'd go about the same problem in a desktop app. You've got an ID (from the browse queue), you need fields from the record, so do a Fetch (get) to retrieve the record (thus those fields), then call the Send Email function/proc. This is all done from "an embed" somewhere around the place. The somewhere would most probably be when you "Send new value to server" on the button click .. Bruce would know that better.

Cheers,

Stu
Cheers,

Stu Andrews

Gregg Matteson

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Custom Program Solutions
Re: Email from a browse using it's data
« Reply #5 on: March 25, 2008, 02:00:45 PM »
Bruce, Stu,

Thanks guys. I am finally making progress I think. More testing to do .
Been away from the Nettalk project for several months. Got a bit of rust to deal with.

whom ever said ignorance is bliss was a real idiot!

Thanks again,

Gregg Matteson
Kindest Regards,

Gregg Matteson

'Software that's actually easy to use'

Gregg Matteson

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Custom Program Solutions
Re: Email from a browse using it's data
« Reply #6 on: March 26, 2008, 08:57:07 AM »
Bruce,

Managed to get this working. Thank you. One remaining issue is a page is not showing up.

Emailformcontrol procedure has URL on Save set to 'ResultOfSendEmail' . It works but if I change it to 'ResultofSendEmail.html' and create the html page as the other static pages are set up it calls the static page but the embeded Net:what ever stuff doesn't show up.
Note that the 'ResultofSendEmail' procedure is a NetWebPage. That's the only thing that appears to be different.
Any suggestions?

Thank you,
Gregg
Kindest Regards,

Gregg Matteson

'Software that's actually easy to use'

Gregg Matteson

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Custom Program Solutions
Re: Email from a browse using it's data - followup
« Reply #7 on: March 26, 2008, 09:23:53 AM »
Bruce,

Found a solution that works fine. I embedded the html in the embed of the ResultofSendEmail procedure on the XHTML tab and it looks fine.

for anyone else following along,  included in this embeded html is a link back to the Netwebform that holds the browse, NOT to the browse itself. Right or wrong this is how the refreshing of the record to the proper ID worked,

Thanks,

Gregg
Kindest Regards,

Gregg Matteson

'Software that's actually easy to use'