Lotus script

    Question by:
    On

    Topics:

    HI;
    I have a Helpdesk DB when a case is raised a case number is assigned automatically from a network file. I have not found any way to make it auto via script only. Now some times when network is slow or due to time out the auto number is not picked when a new case is raised.I want either the field be made in such way that it has to wait unless the number is picked or to be automated via lotus script so i may not need the network file. I have pasted the script here. Please help.
    Thanks

    Sub Querysave(Source As Notesuidocument, Continue As Variant)
          Dim fileNum As Integer
          Dim fileName As String
          Dim NrCrt As Long
          Dim NewNrCrt As Long
          fileNum% = Freefile()
          fileName$ = "\\server\uniqueNo\SRegNo.txt" 'This is the path to the file that keeps the current number
     'If is new doc assign a new number
          If source.IsNewDoc Then
     'Open for reading the file, read the value then close the file
                Open fileName$ For Input Lock Read Write As fileNum% '
                Input #fileNum%,NrCrt
                Close fileNum%
                NewNrCrt=NrCrt+1 'Increment the value
     'Open for writing the file, write the value then close the file
                Open fileName$ For Output Lock Read Write As fileNum%
                Write #fileNum%,NewNrCrt
                Close fileNum%
                If Isnull(NewNrCrt) Then
                      Msgbox("Can't generate the registration number ! Please check the path to the file: " & fileName$ )
                End If
                If Source.FieldGetText("Department")="" Then
                      Msgbox "Please enter the required values such as Department and phone number"
                      continue=False
                      Exit Sub
                End If
                Call source.FieldSetText("sRegNo","ITHELP-" & Str$(NewNrCrt)) 'Complete the current number in the form
          End If
    End Sub
    Good Question?
    0

    Featured Post

    Course: AWS Professional Certification

    These classes are designed to help you pass the AWS Certified Solutions Architect – Associate, AWS Certified Developer, and AWS Certified SysOps Administrator Associate exams—all essential to a career as an AWS professional.

    Top Expert Contributor

    Essential articles and videos from the Experts

    This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.

    More valuable questions with Expert answers

    Question: Hi Guys, The last week or so we have been having all sorts of issues with domino. "File Manager - Log file is Full" Server becoming unresponsive from time to time requireing full system restart. I have just noticed in the domino console...

    Answer: Hmmm... A. shutdown the Domino server, and run Fixup from the command line, e.g. nfixup.exe <filename>.nsf The Domino executables directory should be in your path, and your current directory should be the Domino data directory. B. do...

    Question: Hi Guys, Currently we have DAOS implemented on our mail files. We recently ran into an issue where we were unable to retrieve attachments from mail files that had been archived off server. Going forward we want to make sure this sort of...

    Answer: I assume you are familiar with the basic concepts of DAOS in that it looks for attachments and then stores them as files outside of the database. The daos catalog holds references between the document attachment and the physical file stored in...

    Question: Our company is changing email addresses. The majority of users were converted to a new email address and a few other groups have not been converted yet. We do use encryption certificates for approval emails. This is the error we are getting...

    Answer: you should be able to install both the pre-move and post-move certificates; as you aren't sending from the "old" address, you won't be able to use the "old" certificate for signatures, but should still be able to use it to decrypt inbound messages...

    Question: Hello, We have an arching server named ‘Lotus Notes – Domino Document Manager’ I would like to export ALL attachment files only, NO need metadata. How can I do so ? Regards, David Dotan Sofer

    Answer: An interesting article: http://www.filippodelprete.com/2011/05/how-to-export-the-contents-of-a-domino-doc-library-on-the-local-file-system-part-ii

    201601-LO-Qu-076

    Extend your technology team with the Experts Exchange community.

    — trusted by —

    Who answers my questions?Our community has technology experts around the world.

    Sjef Bosman

    3,758

    Solutions

    Expert in:

    • Lotus IBM
    • Databases-Other
    • Email Clients
    • Email Protocols
    • Email Servers

    Rob Hutchinson

    11

    Articles

    625

    Solutions

    Expert in:

    • Components
    • Hardware-Other
    • Laptops/Notebooks
    • Networking-Other
    • Outlook

    amilie wilson

    5

    Articles

    26

    Solutions

    Amaira Sahni

    5

    Articles

    Emmanuel Gleizer

    1

    Articles

    43

    Solutions

    jvutechnc

    1

    Articles

    1

    Solutions

    RELATED TOPICS view all topics

    1. Exchange
      (194,454)
    2. Email Clients
      (18,345)
    3. Outlook
      (93,669)
    4. MS Excel
      (127,112)
    5. Email Servers
      (23,330)
    6. BlackBerry
      (7,365)
    7. Email Protocols
      (13,746)
    8. MS Access
      (214,531)
    9. Visual Basic Classic
      (163,322)
    10. Databases-Other
      (53,227)