3

I'm creating a List Definition for use on 2007, 2010 (Sandboxed), and 2010 (unrestricted) that will need custom new and edit forms; unfortunately the Sandbox specifically excludes custom application pages.

So far, the only possible solution I've found for this is Wictor's sandboxed web part page workaround. Are there any alternative methods? Additionally, is Wictor's method 2007-compatible?

2 Answers 2

2

The deployment and implementation included in Wictor's article is only suitable for 2010 due to how the solution package would be deployed and how the custom web part is referenced in the custom page. In 2010 sandboxed webparts are referenced using the SPUserCodeWebPart wrapper which does not exist in 2007. In 2007, you can reference the web part directly (don't forget to register the namespace and assembly though).

If you need to target 2007, 2010 (sandbox/user solution) and 2010 (farm solution) then I would suggest you develop 2 different solution packages: one for 2007 and one for 2010 (sandbox/user solution). To cover the farm solution requirement, you should be able to use the sandboxed solution - as far as I am aware, you can install a sandboxed solution in the same way you would a farm solution.

2
  • Thanks Steve. Looks like it'll have to be in separate versions like you say, possibly split into a general 2007/2010 version and a 2010 sandbox version. I don't suppose you've come across any alternatives to Wictor's solution?
    – Stu Pegg
    Jun 27, 2011 at 10:38
  • If you are looking at providing an across-the-board 2007/2010 solution then I don't know of any other way than splitting up the deployment and providing alternative solutions for each scenario. I know InfoPath can be used to extend the New and Edit forms, but that's only in 2010. I am assuming you need to write a code-behind for the New and Edit forms? If that's the case you need access to the server to deploy farm solutions for the required assemblies. If it's something you can provide using WebParts then you may be able to do something a little more generic.
    – Steve
    Jun 28, 2011 at 8:49
0

Try this one:

Enterprise Bugs: Custom NewForm.aspx based on ContentType in SharePoint sandboxed solutions to put JavaScript inside

1
  • 1
    While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines.
    – SPDoctor
    Mar 26, 2012 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.