Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
Booj2 Absent Member.
Absent Member.
1579 views

problem accessing the RecipientStatusList


Hello I have a strange problem.
I don't know if I should post it here or in the gwobjapi forum.


Situation:
I send an appointment to myself and a few others. (just the normal Client function).
The appointment is in the "Send Items" and in the Calendar as expected.


I have a C3PO that adds a button to the Toolbar of an appointment.
When you click on this button, my code collects the appointment,
and then I want to collect the status info of the recipients.


When I double click or open the appointment in the "send items" (or right-click -> properties)
I get the appointment and when I click on my button I can collect the recipients and the status.


When I go to the Calendar view double click, open or right-click -> properties on the same appointment
I get the appointment, but as soon as I want to access the RecipientStatusList I get the error:
"Update access is denied to current user".


The mailids for both situations are different.
The one in send-items is 54C29B54.<domain>.1.111A9.1
The one in calendarview is 54C29B54.<domain>.1.111AA.1


In both cases the client shows the correct "recipient status" for the recipients.


I all the cases I have checked the ID's are different.


How can I get around this, or how can I see if the appointment is opened in the
calendar view or somewhere else so I can prevent the adding of the button.


//part of the Delphi code, maybe it helps.
//I do use the token and object API. (late binding).


The code under the "tool-button"


procedure do_app_mail;
var mid:string;
mm:Variant;
begin
vCommander.execute('ItemMessageIDFromView()',mid);
if mid='X00' then exit; // voorkom problemen bij nieuwe afspraak!
// showmessage(mid);


mm:=vGWAcc.GetMessage(mid);
if not isnotnull(mm) then exit;
do_app_mailen(mm);
end;



// partial code of the real work
// it is called from different locations like the context menu.
// mm is the appointment.


procedure do_app_mailen(mm:variant);
var
mid : string;
vRecs,vRec,VRecSList,vStatus:Variant;
i,j:integer;
code : integer;
flpend,flDecl : boolean;
lijst:TStringList;
sender,owner:String;
h1,h2:string;
dummy:string;


const egwRecipientAccepted = 1;
egwRecipientDeclined = 3;


begin
// is het wel een appointment?
if not AnsiStartsText('GW.MESSAGE.APPOINTMENT',mm.ClassName) then exit;


sender:=mm.Sender.EmailAddress;
owner :=mm.Parent.Owner.EmailAddress;


if sender<>owner
then begin
showmessage('You''re not the owner of this appointment');
exit;
end;


AppMailForm:=TAppMailForm.Create(nil); // create a custom form for some user interaction
try


if AppMailForm.ShowModal=mrOk // user selected the Ok button, so work to do.
then begin
lijst:=TStringList.Create;
try
// mm.Refresh; // Doesn't help!
vRecs:=mm.Recipients;
if isNotNull(vRecs)
then begin
for i:=1 to vRecs.count
do begin
vRec:=vRecs.Item(i);
if isnotnull(vrec)
then begin
flpend:=false;
fldecl:=false;
vRecSlist:=vRec.RecipientStatusList; // <--- crash
if isnotnull(vRecSList)
then begin
for j:=1 to vRecSList.count
do begin
vStatus:=vRecSList.Item(j);




Client version: 14.0.1 (11-11-2014 build: 118328)
PostOffice version: gw14.0.1-118984_full_linux_multi


Hans
Labels (1)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.