I'm working on migrating an existing, large application to XPages by implementing new feature requests in XPinc. XPages migration by stealth, so to speak.
My first task is a brand new document type, which will be a response to a main document that has it's own notes form. I have this requirement for two systems I'm working on right now. I'm planning on using a lotusscript button to get a handle to the response document (or create a new one if one doesn't exist) and then open that document using an XPage instead of a form. The user then interacts with the XPage, saves and closes.
Each method I use has some drawbacks, so I thought I would see if there is a best practice out there - google's not giving me much. Here's what I've tried so far and where it got me:
1) Use uiworkspace.EditDocument(False, doc) This one works pretty well if you've got the form set up to open the XPage instead. However, they have to edit and I'd prefer to open in edit mode. It works well on one of my apps, but the other throws an error "Notes error: No error" before opening the document.
2) uiworkspace.EditDocument(True, doc) I was hoping this would work, but my XPage still opens in read mode. App number two still throws the "No error" error as well. The default action for the data source is "Edit document" so I'm not sure why this won't come out in edit mode.
3) notes:// url to the document This works perfectly on server-based applications, but if I try this on a local replica I get an error "XPages cannot process the application launch page". I don't absolutely need local replicas, but I know that as soon as I break them I will get a user who insists on taking it offline.
4) http:// url to the document Actually haven't tested this one fully, but the sign-in prompt would mean that it is a last resort.
So, no perfect solution for opening the document. Am I doing it wrong? Is there a better way?
Also, what's the best way to close the document once you have it open in XPiNC? Any suggestions?
Cheers,
Brendan