I want to add a custom action menu called "Edit in xxx" which would open a new browser window with url passing the current document id. How can i achieve this?
You can implement this with a custom UI action. You may or may not have to write a little bit of custom client-side JavaScript in order to grab the node reference and pass it in the URL.
I'd go look at the "edit in google docs" action and follow that example. It probably does a lot more than what you need to do, but at least you'll be able to see a working example.
You might start by looking at the action declaration in share-documentlibrary-config.xml: <action id="document-checkout-to-googledocs" type="javascript" label="actions.document.checkout-google"> <param name="function">onActionCheckoutToGoogleDocs</param> <permissions> <permission allow="true">Write</permission> </permissions> <!– gd:googleEditable –> <evaluator>evaluator.doclib.action.googleDocsCheckOut</evaluator> </action>
Then you can go look at js/documentlibrary-actions.js and find the onActionCheckoutToGoogleDocs function to see how the client-side JavaScript action handler works.
If you don't know how to create custom UI actions and configure them using the form service you might want to take a look at this tutorial. Your action won't need anything from the repository tier so really all you need to know how to do is the Share configuration part.
Hey Jeff, thanks. I will take a look. Can you provide me the link to the tutorial that you mentioned in your post? (here …you might want to take a look at this tutorial)