Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7616259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:50:50+00:00 2026-05-31T02:50:50+00:00

How to pass the Document context in Xpages while calling an Agent? In Xpage,

  • 0

How to pass the Document context in Xpages while calling an Agent? In Xpage, I am in need of calling a java agent with documentcontext from my Xpage, And also I am in need of passing my current document as a parameter…

In Lotuscript we can do it as easily without saving the current document, but in Xpage I am using the following code., document1 is a current document.

var agent=database.getAgent("AgentName");
agent.runWithDocumentContext(currentDocument.getDocument());

This code I am not able to get the values of my current document’s items, but if I will use the following code,

var agent=database.getAgent("AgentName");
document1.save();
agent.runWithDocumentContext(currentDocument.getDocument());

I can get the item value of the current document… But I do not want to save the document, without saving the document I need to get the item value of item.

Please give any nice solution for that…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:50:51+00:00Added an answer on May 31, 2026 at 2:50 am

    agent.runWithDocumentContext(currentDocument.getDocument(true)). This will put all the new values inside the backend doc, so it works the same way as lotusscript does. Also, if you need to have the currentdocument computed with the notes form, set the ‘computewithnotesform’ property of the datasource to ‘onload’ or ‘both’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to pass a function/callback from javascript to a java applet? For
I need to pass an ID and a password to a batch file at
So what I'm trying to do here is to pass information from a input
I'd like to pass content back and forth from PHP to jQuery and vice
Is it possible to create a context that is accessible from a set of
If I have <p id='test'>TEST&trade;</p> and I use document.getElementById('test').innerHTML; to pass the HTML to
I'm trying to pass a build number from Hudson into a Flex application. I've
How do I pass in a variable proxy of the this context of the
I have a problem in geting the html content from a div am pass
I'm trying to pass 2 parameters from JQuery's Autocomplete plugin to an ASP.Net MVC2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.