We have created a Custom Web Api based RESTfull service that interacts with CRM Services.
We have few methods that have very complex business logic and it makes number of CRMService calls like RetrieveMultiple, Retrieve, Update, Create etc. this business process ideally need to be ran under Database Transactions so that if anything fails that
the whole process can be rolled back
From best practices, performance and transaction point of view can some of you please suggest some ideas?
One of the suggestion was to create Custom CRM Entity as a staging process and write all the triggering states to that entity record and let CRM may be plugins handle the business process and that would mean it runs under the plugin process pipeline
transaction. Do any of you think this approach would work? can you comment on this approach!
Thank you in advance