[Home] [Recent] [Site Map] [SharePoint] [XBOX]
Also tired of running the publish form wizard every time? Especially when you are developing a larger number of forms this can be a frustrating and time consuming task.
This is a description of the post-build steps for automatically building and deploying the forms:
1. Copy the files to a temp dir (Visual Studio creates a lock on the files)
xcopy "$(ProjectDir)Infopath Form Template\*" "c:\temp\$(ProjectName)\"
2. Delete Myschema.xsx - this is not part of the form template
del /Q "c:\temp\$(ProjectName)\*.xsx"
3. Put the folder in a cab file (download the CAB tool here)
cabtool c:\temp\$(ProjectName)
4. Rename the CAB to XSN
ren "c:\temp\$(ProjectName).cab" "$(ProjectName).xsn"
5. Deactivate the previous edition of the form
stsadm -o deactivateformtemplate -url http://yoursite -filename "c:\temp\$(ProjectName).xsn"
6. Remove the previous version of the form
stsadm -o removeformtemplate -filename "c:\temp\$(ProjectName).xsn"
7. Kick the job service (saves you the wait)
stsadm -o execadmsvcjobs
8. Upload the new template
stsadm -o uploadformtemplate -filename "c:\temp\$(ProjectName).xsn"
9. Kick the job service (again)
stsadm -o execadmsvcjobs
10. Activate the new form template
stsadm -o activateformtemplate -url http://yoursite -filename "c:\temp\$(ProjectName).xsn"
11. Clean up the mesh
del /Q "c:\temp\$(ProjectName)"
del /Q "c:\temp\$(ProjectName).xsn"
This will result in:
xcopy "$(ProjectDir)Infopath Form Template\*" "c:\temp\$(ProjectName)\"
del /Q "c:\temp\$(ProjectName)\*.xsx"
cabtool c:\temp\$(ProjectName)
ren "c:\temp\$(ProjectName).cab" "$(ProjectName).xsn"
stsadm -o deactivateformtemplate -url http://yoursite -filename "c:\temp\$(ProjectName).xsn"
stsadm -o deactivateformtemplate -url http://theirsite -filename "c:\temp\$(ProjectName).xsn"
stsadm -o removeformtemplate -filename "c:\temp\$(ProjectName).xsn"
stsadm -o execadmsvcjobs
stsadm -o uploadformtemplate -filename "c:\temp\$(ProjectName).xsn"
stsadm -o execadmsvcjobs
stsadm -o activateformtemplate -url http://yoursite -filename "c:\temp\$(ProjectName).xsn"
stsadm -o activateformtemplate -url http://theirsite -filename "c:\temp\$(ProjectName).xsn"
del /Q "c:\temp\$(ProjectName)"
del /Q "c:\temp\$(ProjectName).xsn"
Additional tip:
Once you switch from a Debug build to the Release build you should:
- manually remove the pdb files from your manifest file
- remove the pdb files from your project directory
In sharepoint you can either create a personal or a public view on a document libraries, lists etc. You may come across situations where you need only a few individuals to see a particular view.
Lets take an example
Your have a custom list containing software contract information like customer, license type, product, contract date,contract currency, contract amount etc. You are required to allow everyone in the sales department to see this list however the contract amount should be visible only to few management executives. You may create 2 public views, one that has the contract amount and the other that does not. The next step would be to provide read-access to the list to all the people in the sales department.
In sharepoint, if you give read access to a list or library, the person will also have read access to all public views. which means, by default everyone is able to see both the views, one with the contract amount and the one without. Not being able to control access on views seems to be a design flaw/gap in sharepoint. I hope Microsoft will address this in the next release or a service pack. Until that time, here is a workaround that may work in some of the cases
On the list where you want to restrict access to views to a few individual:
Lets say John Smith and Jane Smith are 2 executives who need to see the list views with the contract amount
Open up the list in data sheet view. [List Name]>>Actions>> Edit In Datasheet
Scroll to the column called "Restricted Users"
Under the column, in the first cell type John Smith;Jane Smith ( These 2 names should be in AD exactly as spelled, if not find the correct spelling)
Copy this cell to the rest of the cells under the "restricted users" column and save.
Create a view for this contract list, call it "Contract-Restricted" or an appropriate name. This view should be created as a public view.
In the filter section where it says "show the items when"
When sales people login to the site and selects the list, they will see both the views but when they choose the "Contract-Restricted" view, they will not see any results because of the filter.
The filter essentially looks at the current user logged in sharepoint, if it is John Smith or Jane Smith, the filter condition is met and it returns the result in the "contract-restricted" view otherwise the view will not return any result.
I watched a video with Andrew Connell, and it was brought to my attention that Custom Field Controls may be more appropriate than custom web parts in certain situations... One question that I have is if the tool pane is accessible for the end user when dealing with a field control... Can the design set configuration data from sharepoint designer? Please post any thoughts you may have.
Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!
Links:
Jack's Readings
Month Archives:
Oct 2007
Sep 2007
Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News
@2007 All rights Reserved |