I want to check user while closing xpage in XPiNC and web browser before closing and document e.g. displaying message do you want to save this document or not?
or other checks on different stages of workflow.
Kindly guide me the way forward to get this event in xpages.
Thanks,
Qaiser
Related
I deployed a client script that handles a click event on a custom button. When I click the button, I may an api call to get data and the field is populated with the data. This part works great, but when I go to save the new information on the record, I get this alert:
The record has not changed. Do you really want to submit it?
Is there some way to trigger a form changed event or something similar?
try setWindowChanged(window,true)
I have create a form in Notes Designer version 9.0 and i am unable to forward this form to any users, as i do not find Forward Button under Create Menu.
Not sure if am looking at right options to forward the form, please help.
Thank You
Venu
There are two classic approaches to publishing a form for users to fill out.
Set the Store Form in Document property on the form (see here), and add mail fields (SendTo, Subject, etc.) to it. Add a button that is only visible to you and use #MailSend code in that button to send a document to the people you want to fill out the form. Add another button that is visible to the recipients, and use #MailSend code in that button to send the document back to you, or to a mail-in database. The form will accompany the document wherever it goes. (It will be stored in a field called $Form.)
Just put the form in a database on your server, and set the ACL so that your users can create documents in that database. Send an email message to all the users containing a button with code that executes #Command([Compose]...) with the options set to point to the correct server, database, and form.
Note that both of the above techniques assume that the people you want to fill out the form have Notes clients. If that's not the case, then what you'll want to do is this:
Just put the form in a database on a server that is running the Domino http task, and set the ACL so that your users can create documents in that database. Send an email message to all the users containing a link in the form http://server/path/databasename.nsf/formname?OpenForm
I have an xpage without any data source being used to compile a report. Now I want to send link of this page to different people at 04:00 PM everyday. I am using lotusScript agent to send an email. It's running perfectly fine for web link to open an xpage but notes client link its not opening the page. I am using IBM Notes 9.0.1. Below is the sample code from agent.
Call mailRT.AppendText(" For Web Link ")
Call mailRT.AppendText("http://172.17.5.36/sar.nsf/DailySummaryReport.xsp")
Call mailRt.AddNewline(2)
Call mailRT.AppendText("IBM Notes Client Link --->>> ")
Call mailRT.AppendDocLink(db,"Click to Open Daily Sales Activity System")
Call mailRt.AddNewline(3)
Call mailRT.AppendText("Best Regards, ")
Call mailRt.AddNewline(1)
Call mailRT.AppendText("notes://172.17.5.36/sar.nsf/DailySummaryReport.xsp")
I don't know what is appropriate way to open a an xpages from an email. if i use
Call mailRT.AppendText("notes://172.17.5.36/sar.nsf than it's open launching page of the application otherwise open view last viewed by the user( Call mailRT.AppendText("notes://172.17.5.36/sar.nsf/DailySummaryReport.xsp") ).
Kindly guide me the way forward.
Thanks,
Qaiser
I would send messages always a MIME. It gives you more flexibility in formatting and layout. Stick to the link approach since embedded forms are a security hazard. Start with the eMail bean (you can adopt it to an agent).
When your XPage opens with all the fields you need in edit mode, that's the URL you want to use. if you use http it would open in the browser, use notes it opens in the client.
A Lotus notes doucment is oepned in browser from a notes view. This is opened using xpage and after save and exit like to automatically refresh uiview to show the back end changes.
Any ideas how to accomplish this?
The application is running on 8.5.2 client and only few documents are opened in browser.
Your Save action could call (backend) view.refresh() method, but it is not recommended. This can lead to serious performance problems (semaphore locks on all http threads).
As sais in one of your comments it is opened by a new tab. In fact that makes it a bit easier. When you can create a client side action that mimics the opening of the document by just calling window.open() you can call its parent ( the page you're window.open originated from) to do something.
something like window.opener.document.getElementById()
( you have to google yourself for the correct syntax ).
This would give you the opportunity to call a partialrefresh on your view just before the child browser window is being closed.
Anybody used the "ItemAdding" method successfully in an Event Receiver in Sharepoint for validation?
I think it just can't work properly for validation purposes because it seems that :
You can't access the data you just
entered in a form
If you add an error message,
instead of displaying the form
back with your error, Sharepoint
display the big ugly error page.
Here's what I found so far on the web for the ItemAdding method :
http://www.sharepoint-tips.com/2006/09/synchronous-add-list-event-itemadding.html
http://www.moss2007.be/blogs/vandest/archive/2007/07/20/wss-3-0-event-handler-pre-event-cancelling-issues.aspx
http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25
Anyway, if somebody successfully used that method, please tell me how because I think that it's just broken/missing something!
Thanks!
You can't use ItemAdding to perform that kind of "friendly" validation checking. If you set e.Cancel = true and set e.ErrorMessage, sharepoint will redirect you to the standard error page and display your message. You can't make it redirect back to your form page.
Rather than trying to hack the built in pages, you should use an infopath or aspx form bound to a content type. Infopath has built-in validation controls and with aspx forms you build yourself you can treat it like any web app and choose your own validation.
No easy way out here I'm afraid.
-Oisin
You can access data that was just added in the form. Look at properties.AfterProperties in the adding/updating event receivers.
An example would be properties.AfterProperties["Title"].
I agree that error handling is a little hard, but I recommend that you do validation in your event receivers in addition to having your UI do validation. If it is not a custom page, then you can add JavaScript to existing pages using a Content Editor Web Part to do the validation.