Urgent Help required - Invalid Approval Request note

Hi All

I have written a JScript (.js) to approve deletion of replicated mail files.

The API ApproveReplicaDeletion() always fails with error “'Invalid Approval Request note.”

(I am also using the API for approving mail file deletion and that works fine with the similar script shown below.)

Am I doing anything wrong?

Heres the Jscript for Lotus Notes which I am running with its output, Any help is greatly appretiated:

I am running the script with the following command:

cscript.exe ApproveReplicaMailFileDeletion.js CN=tim46w2k3/O=pspl admin4.nsf passpass1

//Command line processing.

var args = WScript.Arguments;

if(args.length != 3)

{

WScript.Echo(“Invalid arguments to the Script - Usage: cscript.exe ApproveAdminPDeletions.js ”);

WScript.Quit(-1);

}

var serverName = args(0);

var adminPDBName = args(1);

var pwd = args(2);

//Create a Notes session.

var session = new ActiveXObject(“Lotus.NotesSession”);

session.initialize(pwd);

var dir = session.GetDbDirectory(serverName);

var admin4DB = dir.OpenDatabase(adminPDBName);

//Approve Replicated Mail File Deletion

WScript.Echo(“----------Approving Replica Mail File Deletion-----------”);

var ProxyActionForDeleteReplicaMailFile = “75”;

var dc1 = admin4DB.FTSearch("FIELD ProxyAction = " + ProxyActionForDeleteReplicaMailFile, 5000);

var docAd41 = dc1.GetFirstDocument();

while(docAd41 != null)

{

var sNoteID2 = docAd41.NoteID;

WScript.Echo("sNoteID2 " + sNoteID2);

try

{

var adminP = session.CreateAdministrationProcess(serverName);

var sNoteID22 = adminP.ApproveReplicaDeletion(sNoteID2);

}

catch(e)

{

WScript.Echo("Approval for Deletion of Replica Mail File FAILED - " + e.description);

}

docAd41 = dc1.GetNextDocument(docAd41);

}

//========================================================================================================

OUTPUT

//========================================================================================================

C:\Scripts>cscript.exe ApproveReplicaMailFileDeletion.js CN=tim46w2k3/O=pspl admin4.nsf passpass1

Microsoft (R) Windows Script Host Version 5.6

Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

----------Approving Replica Mail File Deletion-----------

sNoteID2 B3A

Approval for Deletion of Replica Mail File FAILED - Invalid Approval Request note.

C:\Scripts>

//========================================================================================================

Subject: Urgent Help required - Invalid Approval Request note.

If you want urgent help, you should contact Lotus Support. This is a user to user forum, not a support line. If you take a look on the right side of this page, you will find the “Forum use and etiquette” under Resources. Read it, you seem to need it.

Browsing through your post, I can’t see anything that would make this even remotely urgent. Approving mail file deletion automatically instead of doing it manually might be convenient, but it could never be urgent.

Why don’t you try coding this in LotusScript using Domino Designer instead of using this strange approach? It would be much more effective.

/Peter

Subject: RE: Urgent Help required - Invalid Approval Request note.

Hi Peter

I completely understand your concern and agree to it.

I aslo agree that URGENT HELP means contact Lotus Support.

I have been using this forum for last 3 years, so i am completely aware of people situation and there expectation from this forum.

The reason why i have put my problem here cause I have a deadline and I am sure you understand customer response on not meeting the deadlines.

I tried finding solutions of my problem on the internet too, but could not find anything useful.

I have my reasons and design to implement this approval part as a JScript and not as a Lotus Script.

The way i run my script is much different from running the Lotus Script.

Due to my deadline, i had to put a subject like this, atleast by seeing the subject someone would reply.

And I have seen many people in this forum, who actually write wiered suibject than this one.

My sincere apologies if I have done anything against this forum. Hope you understand this.

After all this forum is my last option if i am not able to contact Lotus Support

Regards

Sunil Rashinkar

Subject: RE: Urgent Help required - Invalid Approval Request note.

Actually, by using the word urgent in the subject line, there are a lot of forum users that won’t even look at your post, so it really defeats the purpose.

/Peter