1) Create a fetch xml query with the help of Advanced find option and format as in the below code
2) Call service.RetrieveMultiple and pass on the Fetch Xml query to the Fetch expression as in the below code. This should give you the result.
string fetchAccountType = @""+ " "; var entityCollection = service.RetrieveMultiple(new FetchExpression(fetchAccountType)); string accountType = string.Empty; if (entityCollection.Entities.Count > 0) if (entityCollection.Entities[0].Attributes.Contains("new_name")) accountType = entityCollection.Entities[0].Attributes["new_name"].ToString();"+ " "+ ""+ " "+ " "+ " "+ " "+ ""+ " "+ " "+ ""+ " "+ ""+ //Passsing a parameter (accountId) to the fetch xml query " "+ "" + "
No comments:
Post a Comment