Absent Member.
Absent Member.
1444 views

I can't get all fields of contacts (phones)

Hello Everyone,

Contacts in address books contains next fields Home 2 Phone, Callback Phone, Car Phone etc. I try to read contacts information from address books but I these fields. I has got only fields as in older versions of GroupWise (home/mobile/office).



var cRequestRead = new getItemsRequest { container = bookId };
var gwFE = new FilterEntry { field = "@type", value = "Contact", op = FilterOp.eq };
var gwFilter = new Filter { element = gwFE };
cRequestRead.filter = gwFilter;
try
{
var cResponseRead = _gwBinding.getItemsRequest(cRequestRead);
if ((cResponseRead.status.code == 0) && (cResponseRead.items != null))
foreach (var item in cResponseRead.items)
{
var contact = (Contact) item;
lbInfo.Items.Add(contact.fullName.displayName);
var pl = contact.phoneList;
if(pl != null && pl.phone != null)
foreach (var phone in pl.phone) //pl.phone contains only mobile/home/office !!!
{
lbInfo.Items.Add(phone.type + " - " + phone.Value);
}
lbInfo.Items.Add("");
}
}
catch (Exception ex)
{
lbInfo.Items.Add("Error reading from GroupWise.");
}


How can I get these fields?
Labels (1)
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

Re: I can't get all fields of contacts (phones)

Did you login into a 8.0.0 POA and pass
"1.02" in the <version> element of loginRequest?

>>> On Friday, October 02, 2009 at 6:26 AM,

VaronZ<VaronZ@no-mx.forums.novell.com>
wrote:

> Hello Everyone,
>
> Contacts in address books contains next fields Home 2 Phone, Callback
> Phone, Car Phone etc. I try to read contacts information from address
> books but I these fields. I has got only fields as in older versions of
> GroupWise (home/mobile/office).
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> var cRequestRead = new getItemsRequest { container = bookId };
> var gwFE = new FilterEntry { field = "@type", value = "Contact", op =
> FilterOp.eq };
> var gwFilter = new Filter { element = gwFE };
> cRequestRead.filter = gwFilter;
> try
> {
> var cResponseRead = _gwBinding.getItemsRequest(cRequestRead);
> if ((cResponseRead.status.code == 0) && (cResponseRead.items != null))
> foreach (var item in cResponseRead.items)
> {
> var contact = (Contact) item;
> lbInfo.Items.Add(contact.fullName.displayName);
> var pl = contact.phoneList;
> if(pl != null && pl.phone != null)
> foreach (var phone in pl.phone) //pl.phone contains only
> mobile/home/office !!!
> {
> lbInfo.Items.Add(phone.type + " ‑ " + phone.Value);
> }
> lbInfo.Items.Add("");
> }
> }
> catch (Exception ex)
> {
> lbInfo.Items.Add("Error reading from GroupWise.");
> }
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> How can I get these fields?

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: I can't get all fields of contacts (phones)

Thanks, it works!

Preston Stephenson;1866796 wrote:
Did you login into a 8.0.0 POA and pass
"1.02" in the <version> element of loginRequest?

>>> On Friday, October 02, 2009 at 6:26 AM,

VaronZ<VaronZ@no-mx.forums.novell.com>
wrote:

> Hello Everyone,
>
> Contacts in address books contains next fields Home 2 Phone, Callback
> Phone, Car Phone etc. I try to read contacts information from address
> books but I these fields. I has got only fields as in older versions of
> GroupWise (home/mobile/office).
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> var cRequestRead = new getItemsRequest { container = bookId };
> var gwFE = new FilterEntry { field = "@type", value = "Contact", op =
> FilterOp.eq };
> var gwFilter = new Filter { element = gwFE };
> cRequestRead.filter = gwFilter;
> try
> {
> var cResponseRead = _gwBinding.getItemsRequest(cRequestRead);
> if ((cResponseRead.status.code == 0) && (cResponseRead.items != null))
> foreach (var item in cResponseRead.items)
> {
> var contact = (Contact) item;
> lbInfo.Items.Add(contact.fullName.displayName);
> var pl = contact.phoneList;
> if(pl != null && pl.phone != null)
> foreach (var phone in pl.phone) //pl.phone contains only
> mobile/home/office !!!
> {
> lbInfo.Items.Add(phone.type + " ‑ " + phone.Value);
> }
> lbInfo.Items.Add("");
> }
> }
> catch (Exception ex)
> {
> lbInfo.Items.Add("Error reading from GroupWise.");
> }
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> How can I get these fields?
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.