Execute Method

The Execute method executes business logic. It returns a Response object and accepts a parameter as the input of the Request type. You can use this method as a wildcard for all the other methods. This means that you can create an Account by using this method because the class called CreateRequest derives from Request and can be used as the input parameter; you receive a CreateResponse as the result. The same happens for UpdateRequest, UpdateResponse, RetrieveRequest, and RetrieveResponse.

However, this method is usually used for things you cannot do with the other methods. A good example is to close a CRM case. Although the case entity can be updated, you cannot update the status by using the Update method. To close a case, you ...

Get Microsoft Dynamics CRM 2013 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.