: 4582 | 108668 | 12353

Expose the NotesDocument.IsDirty property 
Use this IdeaSpace to post ideas about Domino Designer.

: 56
: 56
: 0
: Domino Designer
: NotesDocument, Dirty, LotusScript
: Mick Moignard2640 25 Jul 2008
:
: / Email
I would like to be able to ask a NotesDocument if it is clean or dirty, so that in complex code I can see if has been changed and determjine whether to save.  Such as
 
If NotesDocument.IsDirty then NotesDocument.Save True, False
 
This is why I want this change:  This piece of code is nasty,and it's a known one that if you save a document twice in quick succession, the second change may not cluster-replicate
'get the claim and check if this bill billed the setup charge: if so, remove it. Ditto if it was the Final bill Dim claim As NotesDocument Dim ClaimChanged As Boolean On Error 4091 Resume Next Set claim = bill.ParentDatabase.GetDocumentByUNID(bill.ParentDocumentUNID) If claim Is Nothing Then Messagebox "Cannot find the parent claim of this bill; this is a serious error. Please report it",48,"System Error: Claim not found" Exit Sub Else If claim.setupbilled(0) = bill.billcode(0) Then 'the claim setup was billed on this bill, so clear it claim.setupbilled = "" Call claim.save(True, False) End If If claim.FinalBill(0) = bill.billcode(0) Then 'the claim setup was billed on this bill, so clear it claim.FinalBill = "" Call claim.save(True, False) End If End If
 
But this is also rather nasty ( a fragment of above)
Dim ClaimChanged As Boolean If claim.setupbilled(0) = bill.billcode(0) Then claim.setupbilled = "" claimchanged = True End If If claim.FinalBill(0) = bill.billcode(0) Then Claim.FinalBill = "" claimchanged = True End If If claimchanged Then Call claim.save(True, False)
 
When what I'd really like to be able to do is this:
If claim.setupbilled(0) = bill.billcode(0) Then claim.setupbilled = "" End If If claim.FinalBill(0) = bill.billcode(0) Then Claim.FinalBill = "" End If If claim.isdirty Then Call claim.save(True, False)
 



1) Gerrit Schut119 (23 Feb 2010)
There is already an idea in the system for the same suggestion. It's called @IfDocIsModified / Doc.IsModified or something like that instead .IsDirty but is the same principle.










:
:




Welcome to IdeaJam


You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>






IdeaJam developed by

Elguji Software Logo