Saturday, May 22, 2010

Using this.Submit to close InfoPath form

Lately I was working on a InfoPath form.  I thought that it will be nice if I can validate the form with custom code and also close it.  I didn't liked the Submit button event handler as it was displaying its own pop dialog box before showing my custom error messages.  I added my own button I tried to use this.Submit() method to execute Submit form option for closing the form, as we know that you cannot call "Close form" from your code.  On form Submit option using "Perform custom action using code" I end up gettting this exception

XmlForm.Submit cannot be called from the SubmitEventHandler.

Finally I figured out that if I use "Perform custom action using rule" on Form Submit options dialog box then from custom button action event handler I can call this.Submit() and it allow for me allowing me to close the form by calling form Submit option - "Close the form".

In case anyone of you interested in how its done here is my project and xsn file -

http://cid-cb9fe32f865358ac.skydrive.live.com/browse.aspx/Public/Submit?lc=1033

also here are some of settings that I had in my form -

On the rule dialog box I just set a temp field to 1,



I hope this will be usefull to those who want to submit and close the form on the same page using code without adding extra view/page to close the form.


Thanks,
Suhaib Khan

Friday, October 23, 2009

Wednesday, October 21, 2009

SharePoint 2010 (Beta) Developer Center

http://msdn.microsoft.com/en-us/sharepoint/ee514561.aspx

What's New in SharePoint Foundation 2010

Atlast for some folks the wait is over here is a list of new features of SharePoint 2010 as posted by Micorosoft -

What's New: Alerts Enhancements

What's New: Business Connectivity Services

What's New: Client Object Model

What's New: Events Improvements

What's New: Microsoft Synch Framework

What's New: Mobile Device Development Enhancements

What's New: Query Enhancements

What's New: Ribbon

What's New: Sandboxed Solutions

What's New: Service Application Framework

What's New: Silverlight Integration and the Fluid Application Model

What's New: UI Improvements

What's New: Windows PowerShell for SharePoint

What's New: Workflow Improvements

SharePoint Products and Technologies (2010)

Finally microsoft started pushing SharePoint 2010 documentation on technet site -

http://msdn.microsoft.com/en-us/library/dd776256.aspx

Wednesday, September 23, 2009

MOSS Limitations pre SP2

Check out performance guidelines and limitations on SharePoint 2007 with SP1 from Microsoft.

http://technet.microsoft.com/en-us/library/cc262787.aspx