To run this agent you must have at leat one document selected - lotus-notes

I am running the agent without any documents in NSF because it fetches the data from an SQL DB. I don't have SQL access. I am running the agent to export all the form names and fields, view names, and their corresponding columns. There is no error in the code. Can't we run an agent without any documents?

Set agent's property "Target" to "None".

Related

Avoid local changes after replication

I have a Notes application that is used offline on a local replica most of the time.
Users can create and update documents.
On the server, an agent processes all new documents.
The idea is that - once the agent processed the documents - the users are no longer allowed to update the documents.
In general, this is quite simple to setup by setting author access on the documents processed by the agent.
But, because users work on the local replica and the agent runs on the server, this scenario is possible:
user creates document offline
replication of document (creating of doc on server)
agent runs on server / user updates document locally
replication of document (updating author access locally / updating changes on server) ==> Causes save conflict or inconsistent data
Is there a way to make sure that the user can no longer update a document once it is replicated to the server.
Or is there a way to force the agent to run on replication and immediately replicate the access update?
I was thinking of creating a button the user can click to replicate/update all documents, but to avoid users that forget to click the button, I prefer the default replication settings to make sure everything is replicated when possible.
When I investigated a few years ago replication does a "pull", then a "push", so doing something on the server won't work. There are a couple of options.
A separate "flag" document which server processing updates, instead of updating the actual document. This would allow for updates causing a second set of processing.
Store a config document / environment variable with the last replicated date, and check against that in the Form's queryModeChange and queryOpen (if editMode). You can then prevent editing if the document was created before the last replicated date.
Instead of using Author fields for the "wrong" reason, I'd add a non-editable Status field, with values like "Initial", "Ready", and all the rest you might need. Then, replication should be set up differently, using a formula that only replicates documents with Status!="Initial". The user might have 2 buttons to save a document: one just saves to the local database and the other also changes the status to Ready. Once Status="Ready", the user can no longer modify the document.
By the way, did you set document replication to "Merge conflicts"? You might reduce the number of conflicts considerably.
One alternative would be to set up the form so that the user never actually saves the document locally. Instead, the document is emailed to the server where an agent triggered by mail delivery performs the actual update. When the agent is done with the update, it sends an email back to the user telling him/her that the updates are available and instructing them to replicate in order to retrieve them. If the Notes client is actually being used for email, you can probably even put a button into the email and say "Click here to replicate and open your document".

Spotfire - filters applied to be saved in DB

How to store user actions like which filter was applied on a table 'xyz' by which user in spotfire?? and this action performed by user must be stored in a database log
No idea why you'd want to log that. You are serving up data to users. Why would you care how they sliced and diced it? Regardless, here is where you want to start:
Tibco Spotfire Server and Environement Action logs and system monitoring

Security and email groups that are created from an external database don't work until the doc is saved

I've got a Notes agent that pulls data from a postgres db. It pulls names, region and roles from the database and builds a 2 types of groups: email and security. They get created fine but when I try to use them they don't work -- email sent to email group is not delivered and the security group just doesn't work. That is until I open and save the group doc. Then everything works fine. I'm suspecting it's one or more fields that are not being set but I don't know which ones. When I create the groups, I set the name, 'type' and 'group type' and, of course, the member list. Anyone know what might be missing?
thanks
clem
Have you compared the docs in NotesPeek before and after you open and re-save them? Are any new computed fields added? Are any field types changed? If so, calling NotesDocument.ComputeWithForm before you save the document in your agent should do the trick.

Notes error: Index is not to be generated on server. (View Name)

I have a database that need to have dynamic views. The view selection will changed based on the user roles. I'm using "Shared, private on first use" views to do this so that when the user opens it for the first time a new separate view is created for her.
It works if I'm not first time opening the database as private views already created on my machine. The problem comes for the first time user. If they are first time accessing the database, they will recieve this error message:
Notes Error: Index is not to be generated on server ("view name")
Please advise.
Check the database ACL. There is a checkbox labeled "Create personal folders/views". Is this box checked for your users?

Is there anyway to Extract the Particular User's Contacts Using the user's nsf file?

In Lotus Notes For Every User there is one nsf file will be created with the userid name as a file name. I want to Extract the Contact details using that nsf file Using Java Lotus Notes API.. (If my userid is user1 means the nsf file created in user1.nsf).. Is it possible to extract all the contacts of that user using the user's nsf file?
The tricky part here isn't reading the contact documents, it's finding the database itself. Depending on the installation, the contacts could be either on the server or local on their workstation.
If you're running from a server agent, you can only access the databases on the current server, or another server your credentials have access to. However, sometimes by default the user's contacts are put into a local database on their workstation and you can only reach them from code running in the user's context.
If that's the case, you have no choice but to find a way to run something on each user's workstation. You could
a) have the user replicate the names.nsf to the server, or
b) synchronize the contacts using the mail action.
For "a", you might send a special email with a LotusScript button in it to automate the replication. I've seen that method used in email migrations when using Quest software's migration tool, and it works well.
For "b", if you have a recent enough version of Notes you may follow these instructions to enabling the sychronize contacts task on the replicator. Ohterwise you'll need to instruct the users how to synchronize contacts using the actions menu. One the contacts are synchronized, a copy of the contact information will be contained in the user's mail file, which will be available on the mail server. You can then simply access the contacts view to read the documents.

Resources