Programatically Publishing InfoPath Form As Site ContentType (Not Central Admin) - sharepoint

Does anyone have any idea how to deploy an InfoPath Form (2007) as a Site ContentType programatically (script or object model)? I do not want the form published to Central Admin and FormServerTemplates, but rather a Forms Library created by a Web scoped feature. The intention is to be able to publish the form via script or code in order to deploy and test the form in dev/stage/prod environments.

Well, I had to cut bait. Seems the two links provided a workable solution for now.
Sahil Malik's articel here provided enough information to deploy the form and the data connection was a simple matter of adding a module to the elements file for the feature. Some tips for this can be found here
Howerver, it seems there is no way to deploy a form to anything other than a Site Feature. After diving into the assembly Sahil mentions with Reflector, there is a check in the code to ensure the Feature is Site scoped. Arrgghh. If anyone can explain why this is, and perhaps an alternative, I would greatly appreciate it! Hope this helps someone else.

Related

Liferay: Can we create deployable site template?

I'm quite new in liferay and this must have been a very basic question.
Can we make site templates deployable as standalone component like themes? If yes how can we do this? Any help or content explains how to do this will be great.
Thanks
You can export and import site templates - they'll not be deployed like themes, but you can carry them from one portal to another. Check the cogs-icon in the top-right of the Site Template configuration screen in Control-Panel and you'll find the Export/Import Actions. The individual SiteTemplate's Action button also has an Export option available.
Another option is to get familiar with Liferay's API (learn ServiceBuilder for understanding the concepts) and examine the sourcecode. A good starting point is the ancient 7cogs sample code (not all will compile as-is, this article is for an older version, but the principles will help you to understand). Also note that the article links a second follow-up article. Everything in Liferay is done through the API and you can literally automate everything - you'll "just" have to find the proper API and use it.
Site templates can be deployed in a plugin via the use of Liferay's Resources Importer.
See: https://dev.liferay.com/develop/learning-paths/themes/-/knowledge_base/6-2/importing-resources-for-your-theme for more information.
You can probably find some some examples here: https://www.liferay.com/marketplace/-/mp/category/15828894

ASP.net site sharepoint integration

I have created a test website that contains a single ASP.net index.aspx file that contains a gridview listing information from a MSSQL database.
I would like to have this made available as a webpart on our sharepoint intranet, how would I go about doing that?
You can just put your page under Template/Layouts and attach it to some SharePoint master page. It will look and feel like a regular SharePoint page.
Of course, that is good if you're into the quick&dirty approach :)
You will need to create a web part from the page you already have.
I would suggest isolating your gridview in a user control (ascx) instead of directly on the aspx page, it will be easier to use it in a web part that way.
To create a web part, you should probably start by downloading WSPBuilder or a similar tool that will do most of the work for you.
The following tutorial will give you the information you need on how to create a web part from a user control.
You should have no problem linking to your database or anything else. A web part behaves just like a user control.

Update base template and apply to all sites who reference it - MOSS 2007

More SharePoint questions from me again today! I thank everyone that has helped thus far!
Here is my situation:
I have to create a custom application inside of sharepoint. I am using a document library which hosts web part pages and i am using Web User Controls to do all the manipluating and displaying of data. Once I build the app the way i want, I am going to turn the doc lib into a template that way i can create the same thing on multiple sites (many customers using this app).
The issue that I am running into is that I need to know what happens/how do I update it so that my changes will apply itself to all sites that are referencing the template.
HELP! anyone who knows how to do this OR has a better idea for creating custom apps that multiple sites will be able to take advantage of would be SO helpful!
Thanks
Short answer is that you cannot accomplish this, even with a custom site/list definition.
Once a site or list is created from a site or list definition, it is basically on its own (layouts and master pages modifications, however, do get applied to all sites referencing them).
Once workaround would be to create a site feature that iterates through sites and performs whatever custom action you wish to do.
For requirement like this, you really should create custom list/site definition. NOT just save customized list into template.
Anything you have updated in list/site definition will be reflect to the sites that are referencing the definitions. Unfortunately this is not the case for Template. You will have to delete the old list you have on other sites, then re-create them again with new template.
how to create list definition - http://msdn.microsoft.com/en-us/library/ms466023.aspx
for site definition please go - http://technet.microsoft.com/en-us/library/cc287930.aspx
James

Customizing SharePoint's NewForm.aspx, or creating my own form... thoughts?

I'm not sure that there will be a definitive answer to my question, but I'd like to read some discussion from other folks on this... here's some quick background.
I'm creating a request form that will handle adding new equipment to our datacenter. I'm collecting some pretty basic info about the submitter and the equipment to add. Some of the metadata gets pretty complex, but I won't get into that here.
At first I started with a browser enabled InfoPath form, because most of our users aren't licensed for the InfoPath rich client. After much frustration I got things working, but could never get a level of performance that I was happy with. Since then I have been playing around with SharePoint's web services and I have a GREAT form that I've written in HTML (with some jQuery magic) that submits to a SharePoint list.
So now I'm asking myself... why not just use this form? First, I can get rid of InfoPath completely... that also helps us out with licensing since I won't need Enterprise licensing. Second, performance... Third, sure I have to hand code it, but I can, and I enjoy it.
So, InfoPath is out the door.
That leads to where I need some best practice ideas mixed in with new ideas. I've got this form that works great, but I want everything to work within SharePoint. As a test, I just created a new view for my list, removed the web part that shows the list, and plopped in my form. Aside from some CSS issues, everything works and it updates the list lightning quick!
But should it be a custom view? Should it live somewhere else? Should I just edit NewForm.aspx?
I'd love to hear some thoughts on this. Ultimately, my entire solution will be deployed as a Feature, but I'm not sure that's relevant.
Thanks!!
I would've done it mostly the same way:
Create a new form (via SharePoint Designer or a custom ASPX page)
Encapsulate the form in a Web Part (you can use the SmartPart Web Part if you're in a hurry)
Create as many custom views as you want, it doesn't really interfere with the way you code the form
If you must modify NewForm.aspx, don't delete the default ListForm Webpart since it's used by SharePoint for other things. You're better of just hiding it to avoid future issues.
Hope that helps
I think you should create custom form templates for your request SharePoint-List.
See MSDN: Creating Custom Form Templates.
I also recommend reading Understanding SharePoint: List Forms.
There's nothing wrong with using a custom form or a completely seperate app to edit SharePoint data. You end up with the same data you would get from using the standard new form, so it can't possibly break anything beyond the modified view.
Setting up a custom newform is probably the most appropriate place for it - easy enough to change the newform url in schema.xml or through designer.

Creating a Sharepoint solution from a site (including workflows and custom webparts)

Here's the scenario
I created a Site which in I used custom lists, webparts, custom developed webparts, workflows et cetera. You can see the site as an application.
What I am trying to do is to create a solution package which holds everything I build in that site so that I can give the solution file to an sharepoint administrator who can install the solution to his sharepoint environment.
For example look at the free application templates you can download from MSDN, I am trying to achieve the same as they did. One solution file to hold them all!
Any idea's?
Cheers!
Get STSDev and SharePoint Manager. STSDev is goog for creating the solution you want and SharePoint Manager can be used to get the SchemaXML from the customisations you have already created.
You will need to package up the webparts and everything. Unfortunately, this is a pretty hefty learning curve, so expect to do a lot of reading on this subject and some experimentation. However, this is time well spent as a solution is the "only" way to release a custom site definition.
Workflows created using SPD are not portable across sites - they will have to be recreated. As a result, Nathan's solution is probably going to be the only way to go.
Export the site as a template and include all the content. The workflows will point at the old site and will need to be updated manually, I believe. Everything else should work.

Resources