Updating Embedded outline in Domino/Notes R5

Tags:
Domino Designer
Lotus Domino
Hi, After searching this and other forums/knowledge exchanges without any luck I've been forced to reask a question posed before (previous answerwers refers to Acessing the personal Mail database for examples, an option not avaliable to me) Using a Agent I update an Outline in my database. The outline is indeed updated in the database, but not in its visual representation (an embedded outline in a page). I Have tried seveal methods of refresing/reloading the page but nothing (short of closing and reopening the database) manages to updata the outline in the client. As mentioned, this question has been posed before and seems to be a biginners problem, answer is alegely avaliable in the code of various Actioins and Agents in the Personal Mail data base, however this database i locked and refuses to reveal its secrets to me. Thankfull for any help! Kind regards A very frustrated programmer new to Domino

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Petter,

I am going to make 2 assumptions in the following code.

a) You are runnning a notes environment > 5.02
b) By “in the client” I am assuming that you mean a Lotus Notes Client.

Sub Initialize
‘This code assumes the mail database is open
‘And that this agent is called from the Action bar or Menu

Dim s As New NotesSession
Dim db As NotesDatabase
Dim ol As NotesOutline
Dim olEnt As NotesOutlineEntry
Set db = s.CurrentDatabase

‘Gets the outline called NotesMailOutline in your Mail Database
Set ol = db.GetOutline(“NotesMailOutline”)

‘Gets the current UI Session and requests the new outline entry name from the user
Dim ws As New NotesUIWorkspace
Dim askme As String
askme = ws.Prompt(PROMPT_OKCANCELEDIT, _
“Outline Entry Name”, _
“Please enter the Name for the new entry here.”)

‘Creates a new outline entry titled with the response from the askme prompt
‘and adds it to the outline
Set olEnt = ol.CreateEntry(askme)

‘Saves the outline with its new entry
Call ol.save()

‘Most important part – refresh the CLIENT! NOT the DOC
Call ws.ReloadWindow( )

End Sub

This agent uses a combination of Front and Back – End classes to create the required outline entry and then update the client in the front end (ws).

Hope this helps!

Regards,
Mat

www.iteam.com.au

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
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
  • MatNewman
    Hi Petter, I am going to make 2 assumptions in the following code. a) You are runnning a notes environment > 5.02 b) By "in the client" I am assuming that you mean a Lotus Notes Client. Sub Initialize 'This code assumes the mail database is open 'And that this agent is called from the Action bar or Menu Dim s As New NotesSession Dim db As NotesDatabase Dim ol As NotesOutline Dim olEnt As NotesOutlineEntry Set db = s.CurrentDatabase 'Gets the outline called NotesMailOutline in your Mail Database Set ol = db.GetOutline("NotesMailOutline") 'Gets the current UI Session and requests the new outline entry name from the user Dim ws As New NotesUIWorkspace Dim askme As String askme = ws.Prompt(PROMPT_OKCANCELEDIT, _ "Outline Entry Name", _ "Please enter the Name for the new entry here.") 'Creates a new outline entry titled with the response from the askme prompt 'and adds it to the outline Set olEnt = ol.CreateEntry(askme) 'Saves the outline with its new entry Call ol.save() 'Most important part - refresh the CLIENT! NOT the DOC Call ws.ReloadWindow( ) End Sub This agent uses a combination of Front and Back - End classes to create the required outline entry and then update the client in the front end (ws). Hope this helps! Regards, Mat www.iteam.com.au
    15 pointsBadges:
    report
  • MatNewman
    Hi Petter, I am going to make 2 assumptions in the following code. a) You are runnning a notes environment > 5.02 b) By "in the client" I am assuming that you mean a Lotus Notes Client. Sub Initialize 'This code assumes the mail database is open 'And that this agent is called from the Action bar or Menu Dim s As New NotesSession Dim db As NotesDatabase Dim ol As NotesOutline Dim olEnt As NotesOutlineEntry Set db = s.CurrentDatabase 'Gets the outline called NotesMailOutline in your Mail Database Set ol = db.GetOutline("NotesMailOutline") 'Gets the current UI Session and requests the new outline entry name from the user Dim ws As New NotesUIWorkspace Dim askme As String askme = ws.Prompt(PROMPT_OKCANCELEDIT, _ "Outline Entry Name", _ "Please enter the Name for the new entry here.") 'Creates a new outline entry titled with the response from the askme prompt 'and adds it to the outline Set olEnt = ol.CreateEntry(askme) 'Saves the outline with its new entry Call ol.save() 'Most important part - refresh the CLIENT! NOT the DOC Call ws.ReloadWindow( ) End Sub This agent uses a combination of Front and Back - End classes to create the required outline entry and then update the client in the front end (ws). Hope this helps! Regards, Mat www.iteam.com.au
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
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

Thanks! We'll email you when relevant content is added and updated.

Following