Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to submit InfoPath 2007 browser Form to SharePoint(MOSS) library using managed code C#?

Posted on 2010-08-26
8
Medium Priority
?
585 Views
Last Modified: 2012-06-27
Hi InfoPath/SharePoint experts,

I got stuck, anyone can show me a real example in code of how to do this?

Many many thanks!
-Rick
0
Comment
Question by:RHADMIN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 28

Expert Comment

by:clayfox
ID: 33538830
My question is why?

Submitting to a form library is a straightforward, default data connection, why complicate it with code?
0
 
LVL 1

Author Comment

by:RHADMIN
ID: 33544034
Good question:
I am tryinig to avoid the unfriendly Error msg. generated by InfoPath Form Service when submitted Form has validation error included and being able to customize the Error msg. myself. Actually I'd like to be able to do the validating before having Valid field values submitted to a SharePoint Library using data connection.
Attached is the unfriendly error msg. my users will encounter.
Thanks,
-Rick

infopathWarningMsg.gif
0
 
LVL 28

Expert Comment

by:clayfox
ID: 33544092
Typically I remove the standard validation and just do it myself in rules before the submit action so that I can have more control.

Often I have a hidden section and field which I display error messages, since int he browser you cannot do pop ups.  So if I want to notify the user of issues a red box appears next to the submit button giving them instructions.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 1

Author Comment

by:RHADMIN
ID: 33544578
Good point, I was thinking doing similar notification to the user either on top of the FORM or bottom of the Submit button as next step. But I realize that you can't prevent the Warning msg. from showing up if the invalid form got submitted by users(they don't like the msg. AT ALL!). That is why I think doing validating and submitting through code on
FormEvents_Submit event can help me solve this problem. But I don't know how to do the validation and submitting through it. NEED HELP!
Thanks,
-Rick
0
 
LVL 28

Expert Comment

by:clayfox
ID: 33544629
Not sure I am following you.

What I am suggesting is removing the required check on the field and then just adding a conditional rule which if the field is blank and possibly looks at other fields or the stage of the form and decides to block submit or notify the user or submit without an issue.

Why won't that work?
0
 
LVL 1

Author Comment

by:RHADMIN
ID: 33545176
Good question: there are some more detail I need to go around with you to explain the conditional rule ALONE can NOT handle(like the Submit button can't be disabled with Rule if the user just enters an invalid email and then click Submit button directly without changing the mouse Focus), or at least can't satisfy the need of a user friendly UI.
I realized that there are way too many limitations imposed on browser form when designing a bit more functional form is needed.
There are gonna be some ways to do the validation and submission through code I believe to be able to circumvent some of these limitations.
Thanks,
-Rick
0
 
LVL 1

Accepted Solution

by:
RHADMIN earned 0 total points
ID: 34158205
Doing validation & submission with code only is feasible! It is the solution to eliminate all(almost) error msg. windows of IP.
-Rick
0
 
LVL 1

Author Closing Comment

by:RHADMIN
ID: 34186404
solution found
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question