Save behavior - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » Save behavior Save behavior Last post 11-01-2006 08:50 AM by Patrick Halstead. 8 replies. Page 1 of 1 (9 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 10-25-2006 07:08 AM nikihoi Joined on 06-30-2006 Posts 40 Save behavior Reply Contact Good day all,I would like for my infopath form to send an email using a data connection when the form gets saved.So when a user is finished saving the document, I would like the form to automatically send an email to a data connection i have set.Is there a way to do this.Appreciate everyones's help on this!!!Thanks!Bernie 10-25-2006 09:18 AM In reply to Agni Jonnalagadda Joined on 12-15-2004 India Posts 617 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact You can call emailadapter.Submit method in the OnSaveRequest() event. Agni / http://www.ggktech.com 10-25-2006 10:12 AM In reply to nikihoi Joined on 06-30-2006 Posts 40 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact quote:Originally posted by Agni JonnalagaddaYou can call emailadapter.Submit method in the OnSaveRequest() event.OK, I am quite the newbie at this, so would you care to go into a little more detail, cause I have no clue what you are talking about?Thanks!!!!! 10-26-2006 04:39 AM In reply to Abhishek Joined on 06-29-2005 India Posts 198 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact Hi Nikhoi,Regarding the EmailAdapter, u can find the code in the following link in both JScript and C#.http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2583&SearchTerms=email,adapterAlso search the InfoPathdev forums with EmailAdapter as the keyword. You will see lot of posts.Now u need to place the code in the OnSaveRequest() event, so that this code executes every time u save the form.Go to Tools menu-->Form OptionsSelect the "Open and Save" tab in the Form Options dialogCheck the "Save using Custom code" check boxClick Edit button U will get the OnSaveRequest method in the Visual Studio (or Microsoft Script Editor) based on what u use.Regards,Abhishek 10-27-2006 05:26 AM In reply to nikihoi Joined on 06-30-2006 Posts 40 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact quote:Originally posted by AbhishekHi Nikhoi,Regarding the EmailAdapter, u can find the code in the following link in both JScript and C#.http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2583&SearchTerms=email,adapterAlso search the InfoPathdev forums with EmailAdapter as the keyword. You will see lot of posts.Now u need to place the code in the OnSaveRequest() event, so that this code executes every time u save the form.Go to Tools menu-->Form OptionsSelect the "Open and Save" tab in the Form Options dialogCheck the "Save using Custom code" check boxClick Edit button U will get the OnSaveRequest method in the Visual Studio (or Microsoft Script Editor) based on what u use.Regards,AbhishekOK, I am really sorry, but that link was no help at all!!! It said to leave stuff blank, but it would not let me procede. When I would copy and paste the code into the script editor, it would look nothing like when I copied it. You have to remember, I have never programmed before, so clueless would probably be an understatement. I was hoping it would just be a copy and paste and change some variables, but it doesn't seem that simple. I don't understand why Microsoft could just made save behavior like open behavior. I am sooo lost... please help!!! 10-31-2006 05:02 AM In reply to nikihoi Joined on 06-30-2006 Posts 40 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact So... is anyone going to help me with this? 10-31-2006 08:16 AM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact Hi Bernie,Sorry about the delay, but we are here to help you with InfoPath issues, not to help you understand how to do programming. We are busy and we have jobs and this is a free forum. We don't make any money on it. It is provided as a service to the developer community. We assume you already learned how to code, or that you are not going to code. Unfortunately, your request to e-mail on save requires code. Now, if you use SharePoint submit (which is a form of save), you can e-mail on submit and you don't need to write any code. You can also hook up a button to e-mail the form, without any code (and save the form as an attachment in your OutLook Sent Items). Those are two options I would recommend for non-programmers.If you found a bug in our code, we will be more than happy to help fix it. However, it looks like you just don't know how to get it to compile, etc. We can't teach you how to code - that's a long journey and it would not be fair to others in the forum (since we would end up spending too much time trying to help the helpless). If you want to become a developer, I recommend reading my book "Developing Solutions with InfoPath" and working through all of the examples. Then, I would read the InfoPath SDK completely (boring but very helpful). When you have done these two things, you will be able to do simple coding in InfoPath, but you won't be a programmer yet.My advice: figure out how to do what you want without writing code. Patrick HalsteadProject Manager at Qdabra 11-01-2006 05:46 AM In reply to nikihoi Joined on 06-30-2006 Posts 40 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact quote:Originally posted by Patrick HalsteadHi Bernie,Sorry about the delay, but we are here to help you with InfoPath issues, not to help you understand how to do programming. We are busy and we have jobs and this is a free forum. We don't make any money on it. It is provided as a service to the developer community. We assume you already learned how to code, or that you are not going to code. Unfortunately, your request to e-mail on save requires code. Now, if you use SharePoint submit (which is a form of save), you can e-mail on submit and you don't need to write any code. You can also hook up a button to e-mail the form, without any code (and save the form as an attachment in your OutLook Sent Items). Those are two options I would recommend for non-programmers.If you found a bug in our code, we will be more than happy to help fix it. However, it looks like you just don't know how to get it to compile, etc. We can't teach you how to code - that's a long journey and it would not be fair to others in the forum (since we would end up spending too much time trying to help the helpless). If you want to become a developer, I recommend reading my book "Developing Solutions with InfoPath" and working through all of the examples. Then, I would read the InfoPath SDK completely (boring but very helpful). When you have done these two things, you will be able to do simple coding in InfoPath, but you won't be a programmer yet.My advice: figure out how to do what you want without writing code. Thanks I guess... didn't want to learn to code. Don't have the time to learn because oh yess... I also have job!!! The responses above make it sound simple, that's why I continued with this, and this isn't the first topic that nobody had responded to.Nice shameless plug on your book ;-) 11-01-2006 08:50 AM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Save behavior Mark as Not AnswerMark as Answer... Reply Contact Hi again,What about the two codeless suggestions of using SharePoint submit and a rule or using just e-mail? Patrick HalsteadProject Manager at Qdabra Page 1 of 1 (9 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
quote:Originally posted by Agni JonnalagaddaYou can call emailadapter.Submit method in the OnSaveRequest() event.
quote:Originally posted by AbhishekHi Nikhoi,Regarding the EmailAdapter, u can find the code in the following link in both JScript and C#.http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2583&SearchTerms=email,adapterAlso search the InfoPathdev forums with EmailAdapter as the keyword. You will see lot of posts.Now u need to place the code in the OnSaveRequest() event, so that this code executes every time u save the form.Go to Tools menu-->Form OptionsSelect the "Open and Save" tab in the Form Options dialogCheck the "Save using Custom code" check boxClick Edit button U will get the OnSaveRequest method in the Visual Studio (or Microsoft Script Editor) based on what u use.Regards,Abhishek
quote:Originally posted by Patrick HalsteadHi Bernie,Sorry about the delay, but we are here to help you with InfoPath issues, not to help you understand how to do programming. We are busy and we have jobs and this is a free forum. We don't make any money on it. It is provided as a service to the developer community. We assume you already learned how to code, or that you are not going to code. Unfortunately, your request to e-mail on save requires code. Now, if you use SharePoint submit (which is a form of save), you can e-mail on submit and you don't need to write any code. You can also hook up a button to e-mail the form, without any code (and save the form as an attachment in your OutLook Sent Items). Those are two options I would recommend for non-programmers.If you found a bug in our code, we will be more than happy to help fix it. However, it looks like you just don't know how to get it to compile, etc. We can't teach you how to code - that's a long journey and it would not be fair to others in the forum (since we would end up spending too much time trying to help the helpless). If you want to become a developer, I recommend reading my book "Developing Solutions with InfoPath" and working through all of the examples. Then, I would read the InfoPath SDK completely (boring but very helpful). When you have done these two things, you will be able to do simple coding in InfoPath, but you won't be a programmer yet.My advice: figure out how to do what you want without writing code.