Manage Learn to apply best practices and optimize your operations.

Sign a Notes/Domino database with three lines of LotusScript

SearchDomino.com member Hemang Kapadia offers this simple LotusScript code snippet that will let you sign a Notes/Domino database without haveing to go through Lotus Notes Administrator.

VIEW MEMBER FEEDACK TO THIS TIP

With this LotusScript code, you can sign a Notes/Domino database without using Lotus Notes Administrator. Just create an agent with the LotusScript code snippet below and then run it. Right click on Run in your client, or SignAgent?openagent through your Web browser to sign the Notes/Domino database.

 Sub Initialize
 Dim session As New Notessession
 Dim db As Notesdatabase
 Set db = session.Currentdatabase
 Call db.sign(DBSIGN_DOC_ALL)
End Sub


MEMBER FEEDBACK TO THIS TIP

But with whose ID will it sign? If a normal user has logged in, it will sign with this ID. The normal user might not have the access to run restricted or unrestricted LotusScript agents. Ideally, it should sign with the Admin ID. Is there a way one can specify the ID where the entire database can be signed using LotusScript?
—Viki L.

******************************************

The agent will sign the database with the ID of the user who signed the agent. Then, you might ask "if the agent is signing with the Admin ID, what's the point?" Admin can use the Lotus Administrator to do it , but what about the developers who don't have access?

This agent can be used for the following scenarios:

  1. Use the Run on Behalf of property of the agent and select the Admin ID; the database will be signed with the ID selected. Anyone can run the agent, as it will sign with the Admin ID.

  2. This agent can be used for a feature that is used by developers or a client where the user can select single or multiple databases, and run the agent from a single button click. This will sign all the databases with the Admin ID, as the agent is signed with admin or by using the method in Point 1 above.
—Hemang Kapadia, tip author

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

Related information from SearchDomino.com:

  • LotusScript Learning Guide
  • FAQ: LotusScript
  • Reference Center: More LotusScript tips and resources

    This tip was submitted to the SearchDomino.com tip library by member Hemang Kapadia. Please let others know how useful it is via the rating scale at the end of the tip. 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.

  • This was last published in March 2006

    Dig Deeper on Lotus Notes Domino Database Management

    Start the conversation

    Send me notifications when other members comment.

    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

    Please create a username to comment.

    -ADS BY GOOGLE

    SearchWindowsServer

    Search400

    • iSeries tutorials

      Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

    • V6R1 upgrade planning checklist

      When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

    • Connecting multiple iSeries systems through DDM

      Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

    SearchEnterpriseLinux

    SearchDataCenter

    SearchExchange

    SearchContentManagement

    Close