Home > Domino Tips > Developer > Domino > An easier way to update a rich text field
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DOMINO

An easier way to update a rich text field


Ed Miller
11.21.2005
Rating: -2.17- (out of 5)


Lotus Notes, Domino, Workplace and WebSphere tips and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


We've all been waiting for it, but it has yet to be delivered – the ability to update a rich text field and displaying the changes to a user without having to save, close and reopen the form.

Currently, if you have a document locking enabled for the database, the traditional method of closing and reopening works. But, if you make a change to the document afterward and try to save it, a save conflict is generated. To get around this, you have to save and close the form, and create a new document to display to the user.

Here's how:

'Set db, doc & uidoc and update richtext field..........

'Display updates for user:
Dim newUIDoc As NotesUIDocument
Dim newDoc As NotesDocument
Dim oldDoc As NotesDocument
 'cannot delete doc from the ui
  
'Save Original Document:
docID$ = doc.UniversalID
doc.SaveOptions = "0" 'so users 
are not prompted to save changes 
Call doc.Save( True, False )
  
'Create New Document 
(can't just open, a conflict occurs due to 
doclocking feature in LN):
Set newDoc = New NotesDocument( db )
Call doc.CopyAllItems( newDoc, True )
Call uidoc.Close( True )
Call newDoc.RemoveItem( "SaveOptions" )
Call newDoc.Save( True, False )
Set newUIDoc = 
workspace.EditDocument( True, newDoc ) 
Delete doc Set oldDoc = 
db.GetDocumentByUNID( docID$ ) 
Call oldDoc.Remove(True)


Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Ed Miller. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Domino
Mimic Lotus Notes Domino application functionality on the Web
A single form to view and edit any Lotus Notes document
DECS and DCR external data access considerations
How to create non-scrolling Lotus Domino view headers on the Web
Disabling the 'Submit' button on a form
Results from Default Notes Search have # of responses in brackets
Lotus Notes/Domino veteran offers comprehensive list of app dev tools
Notes to XML. . .and back again
Creating thumbnail images using LS2J in LotusScript
Fix for modified Form field value is ignored when document is submitted from the Web

Lotus Notes Domino Coding and Development
Tutorial: 30 LotusScript tips
A bevy of Notes/Domino development tips
A Formula language for Lotus Notes introduction -- 7 tips in 7 minutes
Top 10 Notes/Domino developer tips of 2006
Sending and logging faxes from Lotus Notes and Domino
Accessing documents in a Lotus Notes database
A smorgasbord of Notes/Domino development tips
Creating a Lotus Notes view column categorized by month
A project-tracking application for Lotus Notes Domino
What the new Office means for developers

LotusScript
Extracting attachments from a Lotus Notes rich-text field
Programmatically replace the design of Lotus Notes databases
Reading a binary field in an Oracle database with LotusScript
LotusScript equivalent of @Picklist for Lotus Notes
Launch large attachments within an email from a Notes database
How to find files on a hard drive or mapped network with LotusScript
Update the ACL from the Roles view with LotusScript
LotusScript agent moves tagged spam email to junk mail folder
Set a value in a field existing in another Lotus Notes database
Create an automatic scheduled view export in Excel

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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