Can I subscribe to a "onSave" callback when a Document is saved using the WebPlayer? - spotfire

Is it possible to subscribe to a callback when an analysis file is saved using the WebPlayer? For example, the user opens a document in the WebPlayer and selects File -> Save As and saves the document. I have checked the JavaScribed API for something like that without any luck.
The reason for the above is that I want to execute logic when the document is saved. For example, on my site, I have a list of analysis files titles that will have to be refreshed when the user saves a document to the location where the list is being generated.

there is no functionality for this in the product. you would probably have to write a custom extension to make this work.
on the other hand you could just refresh the iframe every x seconds, I suppose.

Related

netsutie:How to reload current page without losing form data in netsuite

There is a sales order record in edit mode.I use window.location.reload() to refresh current page in cilent script after edit some fields value.Then all the data are restored.If I want to reload current page without losing any form data,how to do it?
you can get values which are changed using field change function. Then before reloading function load the record and set the values which are changed and then save the record object.
Actually, we have to understand the functionality and flow of the script first.
Before submitting the record, the data is at the client side ONLY. And to persist the data, you need to save/commit the data in to the Netsuite database.
As soon as the refresh button is hit, it fetches the data from the Netsuite database (which makes sense) and populate the data on to the page.
I hope it clears.
All the best.

File Download Control

Is it possible to access the currently deleted file of a <xp:fileDownload> control?
Im am searching for something like onDelete or beforeDelete event?
I need this, because I have to save the deleted files in a history log.
Thanks in advance
UPDATE (useful answer of a similar problem):
https://stackoverflow.com/a/11941037/4717072
sorry this is all from memory, i may update the answer tomorrow with any corrections (not near my computer at the moment)
instead of thinking in terms of the download control, maybe you could think in terms on the domino document data source.
when you click the delete link of the file download control, it does not immediately delete the attachment but it marks the attachment 'to be deleted' the next time the document is saved.
this information is managed within the domino document data source and not within the control.
there is an 'attachment list' for each attachment field which keeps track of the current state of each attachment in that field. example states are 'in document' 'pending upload' 'deleted'
so maybe in a before save / after save event of the document you could check the attachment list and the state of each attachment and figure out which ones were deleted
the appropriate method to get the attachmentlist is something like
doc.getAttachmentList('yourfield')

Required field doesnt work in document libraries when we upload document in SharePoint 2010

When uploading a new document to the library, its a two step process. the document is considered "posted" as soon as step 1 is complete, but at that point in time none of the required fields has been uploaded yet, resulting in blank items showing.
Is there any way to stop upload document without filling required fields?
Thanks,
There are 2 things you can do here: simple and more advanced.
Simple step is to make your fields "Required". After file has beed uploaded the form will pop up and user will have to fill out fields. Although this will not remove the file uploaded, but it will alert user to fill the fields.
Advanced way is to create event receiver or workflow which would actually remove the file after some period if required fields are not filled out. Workflow option could be easier to create and you can do that in Sharepoint Designer

Lotus notes: create document preview

In LN 6.5.6 i have a view with a lot of type of documents(with different form and fields) and i want to create a preview mode of that document using:
dynamic form: User select a document and a script compose a form with all fields of that document and open it with DialogBox method. (i must have to create a new form because the database do not cointain any form, forms are in other databases)
OR
dynamic view: User select a document and a script compose a view with all fields of that document and open it.
Is this possible?
Sure, it's possible. Just have the script copy the document to a temporary NSF file that contains whatever forms or views you want, and then bring up the dialog from there. The problems, though, are that when the user exits the dialog they'll find themselves in the temporary database instead of where they expected to be, and you'll probably need a way to clean up the temporary database, too.
Or for the view idea, your script can create a temporary folder with the columns that you want, put the selected document in the folder, and then open the folder. Again, though, the problem is that the user will not really know where he is and how to get back where he was, and you'll have to figure out a way to clean up the temporary folders.
Why not instead just add a form to the database, make it the default form, and just give it all the fields it needs for your previews of the fields you want from documents of different types?

Prevent Concurrent Editing of a List Item

In Sharepoint MOSS multiple users can edit the same item in a sharepoint list at the same time…the first person to save their edit “wins”.
Is there a way to prevent this, to lock the list item while it is being edited?
NB: This refers to a custom list -Not a document in a document library
Not possible - checkin/checkout is only supported for list items with an associated SPFile object (images, pages, documents - essentially everything that derives from SPDocumentLibrary)
-Oisin
There are a few ways to do that, all custom. As Oisin said on his post the native check-in/check-out engine needs a file associated.
Ideas:
Javascript
Modified EditForm.aspx file, embedded in a List Template, XmlHttpRequest checks for a "Checked-out Items List" repository, expires/remove the check after 10-20 minutes of inactivity from the user currently editing the file.
.NET
Event Handlers: I have not checked but the ItemUpdating Event Type could stop you from updating it if the Modified date changed since you opened the item, saying the item was modified while being edited and need to be updated (cloning the behavior of aspx/publishing pages in SharePoint)
Infopath
I noticed you said you dont have the enterprise version, still your users could have the InfoPath client on their machines and fill the form locally.
Now lets start the fun :)
Empty Document Template
You can hack your way to create a super "Add Item" button that uploads/creates a new Document Library Item with an empty document (.txt) and redirect the user directly to the Edit Properties form. I did this when I replaced the "Change Image" in the My Sites profile with a Document Library.
Word Document
Word 2007 can create documents similar to forms where the user can only fill the exact fields you want, so can excel (Infopath was created because users were using these programs for forms).

Resources