Change the Universal ID

The java agent code allows you to find a document by UNID and change it to another value. Once run, it will create a new document with that ID. Them you can delete the original.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

	public void NotesMain() {

		try {
			Session session = getSession();
			AgentContext agentContext = session.getAgentContext();
      			Database db = agentContext.getCurrentDatabase();
			Document pdoc = db.getDocumentByUNID("872572A7006EE958852574C0006C55EA");

		} catch(Exception e) {

Written by Frank Joseph Brefere III

Posted by fbrefere001 on Tuesday October 21, 2008