Expert Answer Center > Experts On Demand > View Answer
EMAIL THIS
Experts on Demand
  EXPERTS ON DEMAND HOME     POSE A QUESTION     VIEW ANSWERS     BROWSE BY TOPIC        RSS FEEDS  
I have a form in the Notes Client. A LotusScript button on the form creates a new Notes document object, assigns values to it from the current document and then opens it up in a DialogBox so the user can finish entering information.

I want the dialogbox to pass back to the calling code whether the user clicked ok or cancel. If I use DialogBox default buttons the OK passes a True back, but does NOT save the newly created document. If I use my own OK button to save and close, then a false is passed back to the calling code.

Is there a way to save this newly created document if the user clicks OK and return that value back? I can't pre-save it because the DialogBox needs to be validated. QUESTION POSED ON: 24 FEB 2005
QUESTION ANSWERED BY: Andre Guirard The easy way to do this is to have the LotusScript code that calls the DialogBox check the return value, and if it's True, that code saves the new document. This should work unless you have a Rich Text field in the dialog (Rich Text is not passed back to the caller of DialogBox).

If you must save the dialog document while the dialog is still open, then your OK button can use the RefreshParentNote command (see RefreshParentNote @Command or Tech Tip: Dialog buttons in Notes 6.x) to update field values for the caller. I think that will make the DialogBox call return True; if not, you can set a field to tell the caller that OK was clicked.

HomeExperts on DemandIT Expert Webcast SeriesExpert KnowledgebaseSite Index
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts