edit Thank you everyone who helped. I made another form as the default template for he view and used it for my function. It works great.
Hi Everyone,
I have an issue with running an agent on the selected documents in an embedded view. I have ran the agent with the view itself open in notes and everything worked fine.
The problem is, that when I select documents in my embedded view and click my action button to run my agent, it doesn’t even get to attempt to run my agent. It comes up with the error messages:
- “Document has not yet been saved”
and
- “To run this agent you must have at least one document selected”
Obviously I have at least one document selected.
Is there some issue with this in an embedded view, or is there some option I have to enable?
Thanks,
Smitty
Subject: Selected Documents in an embedded view
If you need your button on the main form, check this out
http://www.lotus911.com/nathan/escape.nsf/d6plinks/NTFN-6Z3R8C
Subject: RE: Selected Documents in an embedded view
Thanks for the input everyone.
For some clarification:
When I said I opened the view itself, I meant I opened it clicking “View In notes” and it worked fine. When I embed the view, and open the form it wont work.
If I get what everyone is saying, I should use a page rather than a form? The form right now is not saved, it is simply being opened and populated based on certain values.
I will try putting it in a page and see how that goes.
edit That still gives me a document not saved error, but it seems to catch my selection.
Is there any way to make this work on a form without saving it? The way I am opening the form is with a hotspot linking to the form element.
Subject: Selected Documents in an embedded view
You first say “I have ran the agent with the view itself open” and then “I select documents in my embedded view and click my action button to run my agent”. Where exactly is your action button? On the form containing the embedded view? If so, that’s the problem. The focus is on the form and the agent is trying to run over it instead of the selected documents in the embedded view. The action button should be a view action on the embedded view for this to work.
If the button is already a view action, then instead of calling the agent, try placing the agent code directly into the view action, with the necessary modifications, of course.
Hope that helps
Subject: Selected Documents in an embedded view
Is the embedded view in a form or a page. Could be that the source document has not been saved. I ran into something similar when I tried creating a document from an action on a form that would be placed in the embedded view. Once I saved the source or parent document everything seemed to work OK.