Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
HCL Domino 11 - Javascript - How to redirect to same document after doc submit ? - View not getting refreshed

I have a web application. After submitting the form using documents.form[0].submit(), the document closes. Instead of getting closed, I need to open the same document in edit mode. I tried to print the doc URL through WebQuerySave Agent. Below is my code in the agent but this prints the last but one doc instead of last doc since the view is not refreshed. I tried adding view.refresh but still it gets the last but one doc. How do I refresh the view and get the current saved doc URL or is there any other way to get the currently saved doc URL ?

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim doc As NotesDocument
  Dim dbview As NotesView
  Dim docUnid As string
  Set db = session.CurrentDatabase
  Set dbview = db.Getview("(WorkOrders)")
  Call dbview.Refresh()
  Set doc = dbview.Getlastdocument()
  docUnid = doc.Universalid
  Print "[https://kclisd01/nibsport.nsf/(WorkOrders)/" & docUnid & "?editDocument]"
End Sub
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use NotesSession.DocumentContext to get the document the agent is currently working on.

Set doc = session.DocumentContext

As described in the linked help document:

For an agent run from a browser with @Command([RunAgent]) or @Command[ToolsRunMacro], the in-memory document is the current document. In the case of WebQueryOpen, this is the document before Domino® converts it to HTML and sends it to the browser; in the case of WebQuerySave, this is the document before Domino® saves it.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda