Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda