Sharepoint 2010/2013 Document Library - Document Versioning - sharepoint-2010

Can we control versions of the documents stored in the library like setting the beginning base version and ignore versioning on certain check-in/check-outs/modifications of a document ?
We are accessing this document library in our application through the client object model. But our legacy application requires a more control over the versions of the documents which are going to be stored in sharepoint and at the same time we would like to leverage the sharepoint document library's versioning features too. How do we achieve it ?

You can only do that using event receiver.
You could have a field named "proposed version" and the event receiver would set it to that. You can hide/making it readonly/set it in pages like viewitem.aspx using jquery.

Related

Prevent VSTO Office Customisation installer prompt from appearing when Opening a document

I have developed a VSTO 4.0 Document Customisation for a custom Template which works fine and installs using ClickOnce.
However, one of the requirements I have is that the resultant documents, being the resultant .docx files, are shared with users outside of my organisation and I DON'T want them to be prompted by VSTO to install the customisation.
The external users should be able to open the document without any VSTO prompts and treat it like a usual Word document, and when the document is saved by the external user and sent back, I can open the document and the the VSTO customisation will work as expected.
This is a usability scenario where a document needs to be collaborated on by my organisation and an external organisation, but I can't expect the external organisation to install the VSTO customisation. They will typically just insert text, pictures and add review comments.
Is there any way that I can achieve this scenario?
BTW, using a Web Addin for Office 365 is not a feasible option at this stage as some of the customisation requirements cannot be achieved with the Word Javascript API.
You need to remove the link from the VSTO document before making it available to outside people. And when the document comes back you can link the customization back to it.
There's an entire MSDN article on the topic, as well as a blog article.
In a nutshell, there are two ways this can be done: from within the opened document or on the closed document.
Run the Document.RemoveCustomization method, which can be assigned to a button in the Ribbon customization, for example. This removes the links stored in Custom Document properties to the VSTO code (which is how the document, itself, finds the code when it opens), as well as any cached data.
Use the ServerDocument.RemoveCustomization method, which essentially does the same thing.
ServerDocument.RemoveCustomization(documentPath);
Re-attaching can only be done via ServerDocument.AddCustomization, logically enough.
string deployManifestPath = System.Environment.GetFolderPath(
Environment.SpecialFolder.Desktop)
+ #"\Publish\WordDocument1.vsto";
Uri deploymentManifestUri = new Uri(deployManifestPath);
ServerDocument.AddCustomization(documentPath, deploymentManifestUri);

How to get Webtop Drl of a document via .net application?

Is it possible to retrieve drl ex:https://host:port /ewebtop/drl/objectId/0900a58e80970f7b of document via .net application?.So that when users clicks on this link they can be able to edit the document and when they close the document the document should be autosaved onto documentum.
First of all: a link is a link. What you decide to do with it I u to you. Default handler in browser will just redirect you to webtop application. If you have SSO you can have the document opened for edit. There are some extra arguments that can be provided (view/edit).
The object id is the only varying part of the URL, so you can easily construct this in code.
Secondly: what is your goal? There is no way to make the document upload itself into Documentum repo. You can write a plugin for every application to handle that, but it seems like a big task - especially dealing with security.
The problem is that upon check-in, user must provide some information - at least about the new version number...
If you're building a thick client in .net I would go with DFS - that's the only real option here.

How to know the url from a pdf component? (Tridion2009)

We have some pdf as a multimedia components. And I would like to know the url before I publish the page where we are using the pdf. The component is already published.
I was trying to guess looking another examples: domain/en/multimedia/Name_pdf.pdf
But didn't work...
¿Someone knows the rule?
Thank you,
A lot depends on how you are handling the multimedia component within your templates, whether you are creating variants (probably not for PDF files) and, to a certain extent, what kind of delivery environment you are using and how it is configured.
If you are trying to output a link to your published binary from a template, you should probably use the out-of-the-box functionality by outputting syntax like
text
from your templates and then using the other default TBBs to publish the component and resolve the link for you.
However, in a default, standard 2009 environment, with normal publishing, you should find that your file is simply published to the file system at
<Publication Images Path>\<Binary Filename>
With the link resolving to
http://<Your server>/<Publication Images URL>/<Binary Filename>
Note:
In earlier versions of Tridion the binary filename was manipulated to include the TCM Id for uniqueness, but by 2009 this was no longer the case

custom page in sharepoint 2010

We are currently working on small SharePoint project.
As per our requirement, we need to implement custom check in page with additional drop down list to select File status.
Would like to know whether we can customize default check in page? If yes, How? How to redirect to custom page?
I would argue that what is the purpose of applying the metadata at the check-in status? Can this be a metadata property of the document? And if so it can easily be set in most office clients inside the document bar. Allowing them to retain their built in office client functionality. If this isn't the case. I would suggest using the Client Side Object Model to build a custom action that sets this value and then checks the file in. It would be much easier than creating custom action pages

Programmatically accessing a Sharepoint list at runtime (without creating a service reference at design time)

I'm creating an app that will be configurable by the end-user to access SharePoint lists, on various different SharePoint sites, that are entered by the user.
All of the examples for reading SharePoint lists I've come across online are of the form:
Open or create a Visual Studio
project.
In Solution Explorer,
right-click the References node, and
then click Add Service Reference.
In the Address box, type the URL to
the target site and append
/_vti_bin/ListData.svc. For example,
the address for the site
intranet.wingtip.com would be
http://intranet.wingtip.com/_vti_bin/ListData.svc.
Change the default name in the
Namespace box from ServiceReference1
to something more appropriate, such
as WingtipSite.
etc, etc, etc
This method creates proxy classes within your project based on the specified server reference. However, in my case, the server/site is not known at design time, only runtime by reading the sites/lists specified by the user. How would one go about doing that (reading the list via http://intranet.wingtip.com/_vti_bin/ListData.svc, but at runtime only)?
Note: I am making this call from a different machine than the one running Sharepoint.
There are a couple answers.
If the lists schemas will be consistent across all the sites you are querying, you can still use the generated proxy. When you create the DataContext, you just need to pass in the URI to the ListData.svc for the site chosen by the user.
If not, then you can use an ASP.NET WebRequest with an appropriately formatted URI and parse out the ATOM or JSON response that comes back.
For more information on using the REST APIs, check out this talk from the 2009 SharePoint Conference
http://msdn.microsoft.com/en-us/sharepoint/ff462048
You can set the URL in your proxy class at runtime with the Url property.
SharePoint does not provide a proxy class for their web services. Therefore it's not possible to set the url at runtime. WHat I have had to do is add 2 service references and then paramaterize which one I will access. I use a config setting to determine which one to access. If the site name changes or list changes, then I need to remove the references, re-add them, recompile and redeploy. There is no way to change the SharePoint site/list at runtime. Have been searching for 3 days for an answer. Microsoft does not know how to accomplish this.