@command([ToolsReplicate]) & error

I have replicas of a database on 2 servers.

On post save I run @Command([ToolsReplicate]; 0).

But the problem is when I can’t connect to the other server, Notes raises: "There is no local copy of this database. Please create a replica of the database before performing this opertaion. "

Any idea how to handle this error and close the window, or at least say to user somethig more meaningfull like “Tthe replication didn’t complete”.

Subject: @command([ToolsReplicate]) & error

It was my missunderstandig that I can use this for replicas on two servers.In fact no matter if I have connection to the other server, this command is trying to replicate with local copy or the database.

So I must search for other solution.

Any Idea?

Subject: @command([ToolsReplicate]) & error

Did you try adding error checking like so?:

@If(@IsError(@Command([ToolsReplicate]; 0)); @Prompt([ok]; “Replication Failed”; “Replication failed due to connection problems”); “”)

Subject: RE: @command([ToolsReplicate]) & error

I tried.@If(@IsError(@Command([ToolsReplicate]; 0));@Prompt([OK];“Replication”;“Not OK”);@Prompt([OK];“Replication”;“OK”))

It raises me th message to create local replica, and it says “OK”. So obviously it is not error for Notes.