Monday, February 23, 2015

SharePoint PowerShell - Set Site Collection Owner

Set-SpSite "http://sharepoint" -owneralias "DOMAIN\username"
Set-SpSite "http://sharepoint" -SecondaryOwnerAlias "DOMAIN\username2"

or alternatively, set the secondary site collection owner to null.

Set-SpSite "http://sp2010:90" -SecondaryOwnerAlias $null

Sunday, February 15, 2015

Upgrading instances of a form - InfoPath 2010 administrator-approved templates

If you have an administrator approved template for InfoPath in SharePoint, you will notice that whenever you upload a new form template via Central Administrator, all existing instances of the form would not be automatically upgraded.

If there are specific scenarios where you need to have existing forms upgraded, there is a very simple workaround.
1. Take note of the most recent uploaded version of the form in Central Administration - General Application Settings - Manage form templates.
2. Download a copy of the form instance.
3. Open the .xml file in a plain text editor.
4. Modify the version in the form's solutionVersion attribute near the header.
 <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:Your-Form-Name:-myXSD-2014-01-27T23-22-27" solutionVersion="1.0.0.155" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://Your-Site/Your-Form-Name.xsn"?>  
5. Save and re-upload the .xml with the same name.

Wednesday, February 11, 2015

五分埔 Wufenpu and Raohe Night Market 饒河街觀光夜市

This is part of the fun Taiwan travel series. View the full itinerary here.

Finally after almost 1 year, I dredged up the energy to bring the Taiwan travel episodes to an end!

On my 9th day of the free and easy trip to Taiwan, we made a short but unavoidable trip to the famous Wufenpu 五分埔 - the place to go for sourcing cheap fashion bargains. It is the largest clothing wholesale market that could be found in Taipei.

 We read from other blogs not to go too early as most shops generally open after noon, so we dropped by the area around 3PM. It is very easy to locate Wufenpu. Just follow the crowd!

After alighting from the Houshanpi MRT exit, we crossed the street and looked for the shop selling braised pork rice called Formosa Chang. It's quite famous as it has been mentioned extensively in travel blogs; however we opted to skip it and had lunch somewhere else.


SharePoint PowerShell: Recursively checkin files in a folder

This is a script that will try to parse a certain folder in a SharePoint 2010 site and recursively check for files that are checked out.
If found, the files would be checked in,

This is useful in situations where you are unable to move files and folders because someone had the files checked out.

Sunday, February 1, 2015

AgilePoint InfoPath C# snippet - Retrieve repeating row data

Sometimes we would need to manipulate data from an InfoPath repeating field, use this data in our AgilePoint workflows. We would need to add custom code for this by using the Advanced Extensions - Managed Code stencil.

Sample of InfoPath schema:



I have a repeating row called Item with 3 fields or nodes.

My example would be to invoke a subprocess for each row of that data.
In order to access the data, I would need the System.Xml and System.Xml.XPath references in my code. I will make use of the XPathNavigator and XPathIterator functions to get data.

Related Posts Plugin for WordPress, Blogger...