@Command([OpenView]) don't work in agent!

Hello! I need to do this:

I have one frameset with 3 frames. And I need to open my views in one of this frames.

I need to use action buttons (on view action bar) to open views.

As i found in this forum, there is BIG problem to opening views in the same window. In my case - in the same frame!!!

The LS method uidb.OpenView(“ViewFrame”) don’t work in this case! A LS error occurs: “unabled to use this method in this context”.

So i tried to use Formula language:

  1. I’v created agent

Triger: OnEvent (AgentListSelection)

Target: None.

Code:

@SetTargetFrame(“ViewFrame”)

@Command([OpenView]; “MyView”)

  1. For run agent i use action button with LS code.

Set db = ls.CurrentDatabase

Set agent = db.GetAgent(“(OpenView)”)

Call agent.Run()

And again the same error occur: “@Function is not valid in this context”!!! @SetTargetFrame() and @Command([OpenView]) don’t work in agent.

I tried to place the same code in view action button:

@SetTargetFrame(“ViewFrame”)

@Command([OpenView]; “MyView”)

In this case this commands work! And view “MyView” opens in frame “ViewFrame”!!!

Of couse i could stop on it. But i need more LS code in action button!!! So i need to do that just using LS or agent!

May you knows how do it!!!

Thanks for your attention to.

I used LS for this:

Subject: @Command([OpenView]) don’t work in agent!!!

What you could do is add @PostedCommand([TOOLSRUNMACRO];“AgentName”) and then write the LS in that agent

Subject: @Command([OpenView]) don’t work in agent!!!

I had a similar problem. What i ended up doing was embedding the view in a page, then opening the page in a frame since opening pages seemed more flexible and, I think, can be done in script. If you zero the page margins, the use of a page is almost imperceptible.

Let me know how you get on.

Subject: @Command([OpenView]) don’t work in agent!!!

LotusScript UI elements are only accessible from Notes UI elements. They are not accessible to agents. Also, no UI elements (LotusScript or @Command) are available to any agent that is running in a background mode. Any agent started from LotusScript will be running in a background mode.