WORKING WITH CUSTOMIZED AIF (SERVICE OPERATION : UPDATE)

EntityKey[] _entityKeyList = null;

List<CriteriaElement> _criteriaList = new List<CriteriaElement>();
CriteriaElement _criteria = new CriteriaElement();

_criteria.DataSourceName = “ContactTable”;
_criteria.FieldName = “RecID”;
_criteria.Operator = Operator.Equal;
_criteria.Value1 = “5637144586”;

_criteriaList.Add(_criteria);

QueryCriteria _queryCriteria = new QueryCriteria();
_queryCriteria.CriteriaElement = _criteriaList.ToArray();
try
{
_entityKeyList = this.getClientObject().findKeys(this.getCallContext(), _queryCriteria);
AxdContactQuery _contactQuery = this.getClientObject().read(this.getCallContext(), _entityKeyList);

AxdEntity_ContactTable _contactTable = _contactQuery.ContactTable[0];
_contactTable.ContactName = “Ahmed Muhammad Alam”;

this.getClientObject().update(this.getCallContext(), _entityKeyList, _contactQuery);
RTB_ErrorBox.Text = “Updated successfully”;
}
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