Problem with a delegated user accessing calendar entries of a renamed user

Anyone not working with Lotus Notes/Domino can ignore this blog entry. For the rest of you, I’ve got a problem… (Just one? Ha ha!):

I have a user that moved to a different OU (via AdminP). This user had their calendar managed by someone else. For some reason, the AdminP request “Rename person in calendar entries and profiles in mail file” either didn’t happen or never got requested. (The OU change occurred over 30 days ago.)

I was engaged when it was discovered that the Mail file owner field contained the username from the old OU. Once that was resolved, the delegate could make changes most of the meetings, but there are some meetings/calendar entries (around 80 of them) that she cannot change. The delegate has manager access to the user’s mail file (don’t ask).

I know that I can probably just run a simple agent to change a couple of fields in the docs. The problem is that they are changing the ‘Sent by’ part of the doc as well. I found an agent that I used for for something else (Found on support.lotus.com – #1087948 Chair cannot make meeting changes after name is changed by AdminP). The problem is that it’s changing the ‘Sent by’ part of the document. Here is the agent code that I used:

Shared – From Action Menu – Run on All docs in view

Lookup := @DbLookup(“”:”NoCache”;”SERVERNAME/ORG”:”Names.nsf”;”($Users)”; @Name([CN];$Busyname);2);
@If(@IsError(Lookup); “”; @SetField(“$BusyName”; @Subset(Lookup;1)));
Lookup := @DbLookup(“”:”NoCache”;”SERVERNAME/ORG”:”Names.nsf”;”($Users)”; @Name([CN];From);2);
@If(@IsError(Lookup); “”; @SetField(“From”; @Subset(Lookup;1)));
Lookup = @DbLookup(“”:”NoCache”;”SERVERNAME/ORG”:”Names.nsf”;”($Users)”; @Name([CN];Chair);2);
@If(@IsError(Lookup); “”; @SetField(“Chair”; @Subset(Lookup;1)));
FIELD Principal :=Chair; SELECT@ALL;
SELECT @All

Does anyone have a clue to what I’m doing wrong? Is there another way I can do this that is more elegant?