Hello experts,
My requirement is - Create an application which will take GUID as input parameter and then fetch the records associated with that GUID and throw in browser in JSON format.
For e.g., I can pass an Account GUID, and the application should return all Contacts associated with this Account which are Active and added in last 1 year in JSON format. (Account/Contact is made up, actually i have to query a custom entity).
I am able to code it upto here without any issue, My code is returning exactly 17 records as it should be with those filter criteria.
EntityCollection accountcollection = _service.RetrieveMultiple(new FetchExpression(fetchaccounts)); After this line I am not sure how to convert accountcollection (CRM SDK Object) directly to JSON data and throw it in the browser or save in notepad without creating a generic class.
Can somebody please help.
Thank you.