Domino 9 und frühere Versionen > Entwicklung

Real time numbering documents on both WEB and Notes Client

<< < (3/3)

Toma Bogdan:

--- Zitat von: Rob Green am 04.06.03 - 14:32:53 ---@unique is not a sequential number, its a random number, see the help please  ;)
Hey, Bogdan, you dont like the Help DB, eh?  ;D ;D

--- Ende Zitat ---

I like and I read the Help but in this problem the help doesn't help me .... eventually this Notes forum and LDD forum  ::)

----------------

I use the agents that you wrote (the first as action of a form button) but I can't receive any mail message when I push the button... it seems that the second agent doesn't run even I receive the message Agent ran ... so how can help me these agents ?

The normal proc for generating doc number is (it works welll when the users doesn't work simultaneously - doesn't try to save the docs in the same time) :

Sub Querysave(Source As Notesuidocument, Continue As Variant)

   Dim session As New notessession
   Dim db As notesdatabase
   Dim doc As notesdocument
   Dim backdoc As notesdocument
   Dim view As notesview
   
   Set db=session.currentdatabase   
   Set doc=Source .document
   Set view=db.getview("NumberLotus")
   Set backdoc=view.getfirstdocument
      
   If Not backdoc Is Nothing Then
      LastID = backdoc.requestIDLotus(0)
   Else
      LastID = 0
   End If
   
   If LastID <> "" Then
      NextID = LastID + 1
   Else
      NextID = 1
   End If
   
   FormattedID = Trim(Str(NextID))
' pad the ID to be 6 characters, with leading zeros
   For x% = 1 To (6 - Len(FormattedID))
      FormattedID = "0" + FormattedID
   Next
   Call doc.replaceItemValue("RequestidLotus", FormattedID)
   
End Sub

Toma Bogdan:
something new ?

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln