I recently implemented a service operation in an attempt to pass some filter parameters to a data service (a user guid and an organization, actually, for impersonation of a user on the service's call to the application).
I successfully added the service operation to the data service, and I can browse the service and see the data filtered as I expected.
However, when I call the service operation from the Silverlight client, I don't get any results, even though I should. Am I missing something? Code below if it's helpful. Thanks!
Service Operation Definition:
public IEnumerable<opportunity> filteredopps(string userid, string org)
/*Define the connection with the impersonated user*/
CrmConnection crmc = CrmConnection.Parse("Authentication Type=Passport; Server=https://" + org + ".crm.dynamics.com/" + org + "; User ID=myuser; Password=mypassword; Device ID=mydeviceid; Device Password=mydevicepassword");
crmc.ImpersonatedUser = new Guid(userid);
var crmOnline = new DataContext(crmc);
List<opportunity> uplist = new List<opportunity>();
var query = from o in crmOnline.opportunityopportunities
foreach (opportunity thisopp in query)
View Complete Post