Working with customized AIF (Service Operation: Read)

ContactQueryServiceClient _client = new ContactQueryServiceClient();
AxdContactQuery _contactQuery = new AxdContactQuery();
EntityKey[] entityKeys = new EntityKey[1];

entityKeys[0] = new EntityKey();
entityKeys[0].KeyData = new KeyField[1];
entityKeys[0].KeyData[0] = new KeyField();
entityKeys[0].KeyData[0].Field = “RecId”;
entityKeys[0].KeyData[0].Value = “5637144586”;
try
{
_contactQuery = _client.read(this.getCallContext(), entityKeys);
lstBox.Items.Add(_contactQuery.ContactTable[0].ContactID + ” ” + _contactQuery.ContactTable[0].ContactName + ” ” + _contactQuery.ContactTable[0].ContactEmail);
}
catch (Exception ex)
{
RTB_ErrorBox.Text = ex.Message;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s