Monday, July 21, 2008
Funny video for developers
http://www.thewebsiteisdown.com/
InfoPath Rules vs Code
There is no way to switch the OoE or Order of Execution within InfoPath. Here is a sample to close the form in code in a js script code behind. There is also no need to sign the form unless the code interacts with the SharePoint OM.
Application.XDocuments.Close(0); //will close form but keep InfoPath open
Application.Quit(bool) //will exit InfoPath and if true force an exit, if false will prompt user if they want to save the form
I used true because in a rule I submit the form so the code can go ahead and quit InfoPath.
Tuesday, July 15, 2008
Installation Instructions for Sitecore CMS 6
Here are screenshots of the Sitecore 6 installation process in case you ever get there.
Sitecore 6 Installation Screenshots
Programmatically create folder within SharePoint List
SPList list = {some SPList object}
SPListItem folder = list.Items.Add(string.empty, SPFileSystemObjectType.Folder, "Name of folder to create");
Monday, July 14, 2008
Login failed for user 'username'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
Login failed for user 'username'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
Most likely indicatest that your SQL Server is not enabled for Mixed Mode authentication, it is probably only allowing Windows logons to log onto it, make it mixed mode and then you'll be able to connect using your SQL server login account. Quick fix but unknown unless you have this information.
Friday, July 11, 2008
Import SharePoint v3 sites using stsadm -o import, replacement for smigrate
So now that you've successfully exported a WSS v3 site we need to figure out how you can import it into another WSS site or into a WSS site sitting underneath your MOSS 2007 site. Again, the export gives us some functionality that smigrate did not, mainly the ability to import user security from our exported file. Here is the command line instructions:
stsadm.exe -o import -url
-filename
-includeusersecurity
-haltonwarning
-haltonfatalerror -updateversions <1-4>
1 - Add new versions to the current file
2 - Overwrite the file and all its versions
3 - Ignore the file
4 - Terminate with conflicts
-quiet
And here is an example:
stsadm.exe -o import -url http://officepoint.blogspot.com/SiteDirectory/NewlyImportedSite -filename C:\backups\officepoint.blogspot.com.bak -includeusersecurity -haltonfatalerror -updateversions 1
This will import my backup file named officepoint.blogspot.com.bak to the site named NewlyImportedSite that sites beneath my MOSS site, it will, of course, include all of the user security from the exported site, it will stop importing if it encounters a fatal error and will update the versions of the site instead of deleting them and replacing them.
WSS (SharePoint) v3 stsadm.exe -o export, replacement for smigrate
stsadm.exe -o export -url
-filename
-overwrite
-includeusersecurity
-haltonwarning
-haltonfatalerror
-versions <1-4>
1 - Last major version for files and list items
2 - The current version, either the last major or the last minor
3 - Last major and last minor version for files and list items
4 - All versions for files and list items
-cabsize
-quiet
So an example of this would be:
stsadm.exe -o export -url http://officepoint.blogspot.com -filename C:\backups\officepoint.blogspot.com.bak -overwrite -includeusersecurity -haltonfatalerror -versions 2 -quiet
This will export the WSS located at http://officepoint.blogspot.com to a file named officepoint.blogspot.com.bak in the backups folder on my C: drive. It will overwrite any backup files already there. It will include all of the user security of the site. It will stop the export if it hits a fatal error, it will perform a quiet export and export the current version of the site.
It takes a little longer to run because of all the extra web parts and lists created with WSS v3, but it'd definitely nice to have this ability. The only question I can think of is, if I copy the stsadm executable to a WSS v2 site, will it export v2 sites with their security or is this functionality only limited to version 3?